Formulário Básico MODX FormIt

[[!FormIt?&hooks=`spam,email,redirect`&emailTpl=`SendEmailChunk`&emailTo=`info@domain.com`&emailUseFieldForSubject=`1`&redirectTo=`9`&validate=`name:required, email:email:required, subject:required, text:required:stripTags` ]][[!+fi.error_message:notempty=`<p>[[!+fi.error_message]]</p>`]]<form action=”[[~[[*id]]]]” method=”post” class=”contactForm”><input type=”hidden” name=”nospam:blank” value=”” /><div> <label for=”name”> Name: <span class=”error”>[[!+fi.error.name]]</span></label><input type=”text” name=”name” id=”name” value=”[[!+fi.name]]” /></div><div> <label for=”email”> Email: <span class=”error”>[[!+fi.error.email]]</span></label><input type=”text” name=”email” id=”email” …

Continuar lendo

Insira várias caixas de seleção no MySQL

PHP //class//functionclass Plan_Process {function do_plan($visible, $plan_submit) {if(isset($plan_submit)) {//print_r($visible);//exit();$visible = implode(‘,’, $visible);$query = &SadoFactory::getInstance();                $query->insert(‘plans’, array(‘visible_to’ => $visible)); echo ” PLAN CREATED.”;} // eof …

Continuar lendo

Botões de alternância de dados HTML5 [FORM]

HTML <div data-toggle=”buttons-radio”><button type=”button” class=”btn” id=”yesBtn” data-info='{“post”:”1″}’>Yes</button><button type=”button” class=”btn” id=”noBtn” data-info='{“post”:”0″}’>No</button></div> CAMPO OCULTO <input type=”hidden” id=”post_to_fb” name=”post_to_fb” value=””> jQuery $(‘#yesBtn’).click(function(e) {e.preventDefault();thisdata = $(‘#yesBtn’).data(‘info’).post;//console.log(thisdata);$(“#post_to_fb”).val(thisdata);});$(‘#noBtn’).click(function(e) {e.preventDefault();thisdata = $(‘#noBtn’).data(‘info’).post;//console.log(thisdata);$(“#post_to_fb”).val(thisdata); });

Continuar lendo

processador mysqli simples

<?php$database_server = “localhost”;$database_user = “XXX”;$database_password = “XXX”;$dbase = “XXX”;$mysqli = new mysqli($database_server, $database_user, $database_password, $dbase);/* check connection */if (mysqli_connect_errno()) { printf(“Connect failed: %sn”, mysqli_connect_error()); exit();}$insert = “INSERT INTO `leads` ( …

Continuar lendo