CFv4 Custom Select - not selecting Alabama

Osithee 08 Dec, 2012
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:

<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?
GreyHead 08 Dec, 2012
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
GreyHead 08 Dec, 2012
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
Osithee 08 Dec, 2012
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
Osithee 08 Dec, 2012
Hi Bob,

Nevermind. I re-read your post and actually followed the instructions this time. Totally worked! Thank you so much.

Michelle
GreyHead 10 Dec, 2012
Hi Michelle,

Good to hear that you got it working.

Bob

PS the folder is at administrator/components/com_chronoforms/form_actions
Osithee 12 Dec, 2012
Aha! In the Administrator folder. You really are brilliant. Thanks again.

I'm off to buy you a beer.

Hope you had a great time on your trip.

Michelle
This topic is locked and no more replies can be posted.