Hi Guys,
I downloaded Grayhead's CFv4 Custom Select [GH] action (thanks for that btw!)and it is working great except for one problem: Alabama will not select.
I've got it as a required field and when I select Alabama the validation bubble pops up and tells me asks me to choose a value. I can choose any other state. Just not the very first one.
I'm using the Form Wizard. The Custom Select [GH] : state drop down is loaded before Show Html on the Actions tab. Configured as follows:
Data path: us_states
Option file: US States
No custom options
Use Text as values: checked
Action Label: state drop down
For My element, I dragged a drop-down box and it is configured like this:
General tab
Label text: State:
Field name: state
Validation tab
Required: checked
Dynamic tab
Enable: checked
Data path: us_states
Value key: value
Text key: text
Here is the code that shows in the direct edit:
What am I doing wrong?
I downloaded Grayhead's CFv4 Custom Select [GH] action (thanks for that btw!)and it is working great except for one problem: Alabama will not select.
I've got it as a required field and when I select Alabama the validation bubble pops up and tells me asks me to choose a value. I can choose any other state. Just not the very first one.
I'm using the Form Wizard. The Custom Select [GH] : state drop down is loaded before Show Html on the Actions tab. Configured as follows:
Data path: us_states
Option file: US States
No custom options
Use Text as values: checked
Action Label: state drop down
For My element, I dragged a drop-down box and it is configured like this:
General tab
Label text: State:
Field name: state
Validation tab
Required: checked
Dynamic tab
Enable: checked
Data path: us_states
Value key: value
Text key: text
Here is the code that shows in the direct edit:
<div class="ccms_form_element cfdiv_select" id="state1_container_div" style=""><label>State: </label><select size="" class=" validate['required']" title="" name="state">
<?php
$options_data = $form->get_array_value($form->data, explode(".", "us_states"));
if(!is_null($options_data) && is_array($options_data)){
foreach($options_data as $option_data){
if(isset($option_data["value"]) && isset($option_data["text"])){
echo '<option value="'.$option_data["value"].'"'.(in_array($option_data["value"], array (
0 => '',
)) ? ' selected="selected"' : "").">".$option_data["text"]."</option>\n";
}
}
}
?>
</select>
<div class="clear"></div><div id="error-message-state"></div></div>
What am I doing wrong?
Hi Osithee,
Please post a link to the form so I can take a quick look.
I'm about to go away for the rest of the weekend, I'll check this out when I get back.
Bob
Please post a link to the form so I can take a quick look.
I'm about to go away for the rest of the weekend, I'll check this out when I get back.
Bob
Thank you so much! Here's the link:
http://www.teachingenglishlearners.com/staging/index.php/sign-up-for-free-samples
http://www.teachingenglishlearners.com/staging/index.php/sign-up-for-free-samples
Hi osithee,
I'm not sure why the validation is behaving like that. Please try adding a Show Empty value like '=?=' or 'Pick one' in the Drop Down element configuration; that may fix it.
Back next week.
Bob
I'm not sure why the validation is behaving like that. Please try adding a Show Empty value like '=?=' or 'Pick one' in the Drop Down element configuration; that may fix it.
Back next week.
Bob
Hi Bob,
I so hate to admit this because I feel like such an idiot but I'm having trouble locating the form_actions folder in my com_chronoforms folder. Is it supposed to be in /components/com_chronoforms? Because I've got css, js, libraries, uploads, and views... but no form_actions folder.
Or am I looking in the wrong place?
Thanks again and have a great time on your trip!
Michelle
I so hate to admit this because I feel like such an idiot but I'm having trouble locating the form_actions folder in my com_chronoforms folder. Is it supposed to be in /components/com_chronoforms? Because I've got css, js, libraries, uploads, and views... but no form_actions folder.
Or am I looking in the wrong place?
Thanks again and have a great time on your trip!
Michelle
Hi Bob,
Nevermind. I re-read your post and actually followed the instructions this time. Totally worked! Thank you so much.
Michelle
Nevermind. I re-read your post and actually followed the instructions this time. Totally worked! Thank you so much.
Michelle
Hi Michelle,
Good to hear that you got it working.
Bob
PS the folder is at administrator/components/com_chronoforms/form_actions
Good to hear that you got it working.
Bob
PS the folder is at administrator/components/com_chronoforms/form_actions
This topic is locked and no more replies can be posted.