215 Posts
cubist
10 years ago
5
Topic
I have created a radio type field "Route" with the choices A and B (with default set as B)

IF another field in this case, city is filled with "Gotham", then I want the Route field to be filled by A

I have tried multiple variants for the Conditional State settings, but none work.

It would seem this should work ...

States: This field "is filled by" "A" "#form#"

WHEN

Triggers: City "is filled by" "Gotham" <-- also tried "is Equal / In"


Any one have the right settings that should make the radio field change to an "A"?

Shouldn't this happen onBlur, ie after exiting the city field?
Get a VIP membership
10 years ago
2
Level 1
Hi cubist!  I was struggling with this the other day, too -- it's just "Is Filled", so:
This field "Is Filled" "A" "#form#"
WHEN
Triggers: City "is Equal / In" "Gotham"
And yes, it happens when exiting the City field.

Hope that helps!
215 Posts
cubist
10 years ago
1
Level 2
Thx, helps a lot. Curious if you've had to tweak it further for other cities ... especially when users don't capitalize properly?

Tho it looks like I can write a function for that ... using Code Before Render on the products page
10 years ago
0
Level 3
I haven't actually had to tweak it because my "where" clause is a little different (I just want to change the state of the button when anything at all is entered into the trigger field).

Came across this Regex Validation free plugin -- maybe there's regex settings for capitalization that you could use?
10 years ago
0
Level 1
@cubist
you could use a select field for your cities to avoid different spelling.
10 years ago
0
Level 1
buggy forum..lost my post..

1) you can capitalize letters with Jquery, here's the fiddle http://jsfiddle.net/jasper/qppGQ/3/
2) you may use custom regex ^([A-z][a-z]+[ ])*([A-z][a-z]+)$
Get a VIP membership