Hi,
I am using Chrono Forms 2.0 and when I fillin my form and say I made a mistake in entering the captcha (Imageverification) phrase, the form resets back to empty fields. As you can imagine this is not very friendly if you have a large form with many fields that you have entered. Is there any way to avoid this but need to keep the captcha / Imageverification functionality?
Many thanks for your help.
Al<br><br>Post edited by: lightbeing, at: 2007/09/28 13:03
I am using Chrono Forms 2.0 and when I fillin my form and say I made a mistake in entering the captcha (Imageverification) phrase, the form resets back to empty fields. As you can imagine this is not very friendly if you have a large form with many fields that you have entered. Is there any way to avoid this but need to keep the captcha / Imageverification functionality?
Many thanks for your help.
Al<br><br>Post edited by: lightbeing, at: 2007/09/28 13:03
I have just upgraded to the latest stable release v2.3.4 and it is still clearing my form fields when I enter a wrong value for the imageverification. Is this a bug or a feature? Any help will be very appreciated.
Regards,
Al
Regards,
Al
I have just upgraded to the latest stable release v2.3.4 and it is still clearing my form fields when I enter a wrong value for the imageverification. Is this a bug or a feature? Any help will be very appreciated.
Regards,
Al
Regards,
Al
Hi Al,
You should have version 2.3.4 or later installed then you should add this piece of code inside the value attribute of each field to keep its value :
this will keep the submitted value for this field!!๐
Cheers
Max
You should have version 2.3.4 or later installed then you should add this piece of code inside the value attribute of each field to keep its value :
<?php echo $_POST['field_name_goes_here']; ?>
this will keep the submitted value for this field!!๐
Cheers
Max
Thanks Max that worked for an input field๐. How about keeping the values of a dropdown or radio button field(s)?
Regards,
Al<br><br>Post edited by: lightbeing, at: 2007/09/28 16:05
Regards,
Al<br><br>Post edited by: lightbeing, at: 2007/09/28 16:05
Nice question, this will need alittle longer PHP to check the submitted value, and in case of a dropdown you echo "selected" at the right option and in case of radio you echo "checked"!!๐
Cheers
Max
Cheers
Max
For TEXTAREA, you must insert the php code between the TEXTAREA tags instead of in value=""
A little help here? Do you have an example of said PHP script to check submitted value?<br><br>Post edited by: PlayGod, at: 2007/12/29 01:43
<TEXTAREA name="address" cols="24" rows="2" class="h20" value=""><?php echo $_POST['address']; ?></TEXTAREA>
this will need alittle longer PHP to check the submitted value
A little help here? Do you have an example of said PHP script to check submitted value?<br><br>Post edited by: PlayGod, at: 2007/12/29 01:43
this will need alittle longer PHP to check the submitted value
A little help here? Do you have an example of said PHP script to check submitted value?
Thanks, that's very helpful... but I noticed a few problems with the FAQ...
is missing the close ; ?>
and for radio or checkbox buttons... try the following to properly create an array of values and check them...
<textarea. . .><?php echo $_POST['field_name']</textarea>
is missing the close ; ?>
<textarea. . .><?php echo $_POST['field_name']; ?></TEXTAREA>
and for radio or checkbox buttons... try the following to properly create an array of values and check them...
<input type="checkbox" name="property-type[0]" value="single family home" <?php if($_POST['property-type'][0] == 'single family home')echo' checked '; ?> />
Single Family Homes<br>
<input type="checkbox" name="property-type[1]" value="duplexes" <?php if($_POST['property-type'][1] == 'duplexes')echo' checked '; ?> />
Duplexes<br>
<input type="checkbox" name="property-type[2]" value="apartment community" <?php if($_POST['property-type'][2] == 'apartment community')echo' checked '; ?> />
Apt Community<br>
<input type="checkbox" name="property-type[3]" value="commercial" <?php if($_POST['property-type'][3] == 'commercial')echo' checked '; ?> />
Commercial Property<br>
<input type="checkbox" name="property-type[4]" value="home owners association" <?php if($_POST['property-type'][4] == 'home owners association')echo' checked '; ?> />
Home Owner Association</td>
<br><br>Post edited by: PlayGod, at: 2007/12/31 19:47
Hi PlayGod,
Sorry about the missing code . . . my excuse is that the FAQ editor isn't very good at handling code and I have to work out which <>s have to switched to entities. I'll try and fix it . . .
Bob
Sorry about the missing code . . . my excuse is that the FAQ editor isn't very good at handling code and I have to work out which <>s have to switched to entities. I'll try and fix it . . .
Bob
Hi PlayGod,
Hmmm they are turned on but the mambots aren't active with the EasyFaq module . . . I think I fixed the FAQ here though.
Bob
Hmmm they are turned on but the mambots aren't active with the EasyFaq module . . . I think I fixed the FAQ here though.
Bob
halloooooooo
this piece of code works in my form as well, but what about the typed text in a textarea. it seems not work there.
thanks in advance
sepppp
upppps, sorry for writing that. i didn't realize that there where other 2 pages to read. please delete my stupid post<br><br>Post edited by: sepppp, at: 2008/04/12 21:52
this piece of code works in my form as well, but what about the typed text in a textarea. it seems not work there.
thanks in advance
sepppp
upppps, sorry for writing that. i didn't realize that there where other 2 pages to read. please delete my stupid post<br><br>Post edited by: sepppp, at: 2008/04/12 21:52
This topic is locked and no more replies can be posted.