Your wonderful plugin is working like a charm but some of my visitors find it confusing that the “Visitor verification Q&A” is not marked with “Is required” when all other mandatory fields are marked with “Is Required”.
Can I add something to the code to allow for the “ Is Required” option to be selectable for “Visitor verification (Q&A)” field types as well.
Your help is much appreciated
Browser: Firefox 184.108.40.206/IE6
Cforms II version: 5.5
March 6, 2005
Dear Oliver, thank you for your quick answer
Your suggested adjustment allowed for a check-box for Visitor Verification (Q&A).
Unfortunately when selecting this new option and updating the settings inside “Form Settings”, the check-box gets unchecked.
I.e the option is selectable but does not seam to be assigned to the appropriate variable.
Is there an option-array that needs to be updated as well?
March 6, 2005
Ah, right. Forgot to add that you need to add it to the 'allowed' list in lib_options_sub.php (~ line41):
if(isset($_REQUEST['field_' . $i . '_required']) && in_array($type,array('textfield','datepicker','text…
if(isset($_REQUEST['field_' . $i . '_required']) && in_array($type,array('verification','textfield','datepicker','text…
This should do it, I think ;-)
Yes that did it, the Q&A is now a required field.
In fact it is so much required so that the regular Q&A function stopped working.
When the form has been completed, including the (Q&A) and is submitted, the “Fill out the required field”-error message is presented for the Q&A-field.
The Q&A-field has also been cleared.
Guess you can’t have it all :)
If this is very complex perhaps you can point me to part of the code that generates the html for the Q&A field so I can hard code a “Is required”.
March 6, 2005
Hm, sorry it wasn't as easy as I had hoped – it came of top off my head. If I find the time the next days, I'll take a closer look into the code, for the time being, the work around would be to simply ad some text after:
$field = '<input type="text" name="cforms_q'.$no.'" id="cforms_q'.$no.'" class="secinput ' . $field_class . '" value="" />';
$field = '<input type="text" name="cforms_q'.$no.'" id="cforms_q'.$no.'" class="secinput ' . $field_class . '" value="" />'.'<span class="reqtxt">Is required</span>';
(line ~1140, cforms.php)
Thanks and if any one else want do this, you might need to add some margin CSS (input.secinput in your .css file) to get the required text to look consistent.
Most Users Ever Online: 959
Currently Browsing this Page:
Guest Posters: 3762
Newest Members: juredujmovic, dreamkeeper, rajattyagi, wrokaa, lukass
Moderators: Paul (421), cnymike (8), sonika (95)
Administrators: Oliver (6400), Nicky (3)