Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
p01-contact : simply add contact forms in your pages
(2012-09-04, 11:23:14)mdc.girmm Wrote: So... I still fighting with the problem of the checkbox validation. I don't want to bother you, but it's really important for me. I guess it's time to learn PHP...

I have tryed with this:

case 'radio':
if($this->value == "yes")
return True;
else return False;


I too am trying to add a required field to a form, but am having no luck at all.

I have added this to the form:
Code:
checkbox! "Acepto las condiciones de uso y aviso legal de esta web y su política de privacidad." "Acepto",

Which gives me an output of:
Code:
<div class="field checkbox">
                <div class="label"><label for="p01-contact1_field4">Acepto las condiciones de uso y aviso legal de esta web y su pol&iacute;tica de privacidad. <strong style="color:red">*</strong></label></div>
                    <input id="p01-contact1_field4_option0" type="checkbox" name="p01-contact_fields[4][0]" value=" Acepto" /> Acepto</div>

And tried adding the following to p01-contact.php around line 871:
Code:
case 'checkbox':
            if($_POST['p01-contact_fields'][4] == " Acepto")
             return True;
            else return False;

A red star shows up next to the field, but it allows the form to be sent regardless if it is checked or not.

Can anyone provide further assistance?


GS Community Edition with php8.x compatibility, new features and much more!  Support Me


Reply


Messages In This Thread
askcopy syntax Not Working - by celextel - 2019-05-24, 01:54:40
RE: askcopy syntax Not Working - by celextel - 2019-05-28, 01:51:47
RE: p01-contact : simply add contact forms in your pages - by islander - 2013-04-04, 20:27:02



Users browsing this thread: 2 Guest(s)