I Feel so stupid.. But i'm not able to figure out.
Wich is the correct way to populate a fieldtext with the label (not the key) of a dropdown field?
E.G.
Dropdown options:
I would like to set the field text value = to YES or NO depending the dropdown selection...
I tryed to reload the field text and call an event with a switch and a custom code, but with no lucky.
Thank's in advance..
LUCA
Wich is the correct way to populate a fieldtext with the label (not the key) of a dropdown field?
E.G.
Dropdown options:
1=Yes
2=No
I would like to set the field text value = to YES or NO depending the dropdown selection...
I tryed to reload the field text and call an event with a switch and a custom code, but with no lucky.
Thank's in advance..
LUCA
HI Bob
Thank's for replay.
But the FAQ is for CF4. I'm working in CF6.
It's the same ?
Luca
Thank's for replay.
But the FAQ is for CF4. I'm working in CF6.
It's the same ?
Luca
No.. It does not work..
Or .. better.. I'm not able to apply the CF4 FAQ'S to CF6..
I also read this FAQ on how to use the Variable ShortCode.
I also triyng this way:
In the DROP_DOWN i set an EVENT on CHANGE to RELOAD the text field.
In the TEXT_FIELD i set the reload option with UPDATE event.
I created an event called UPDATE.
Put inside a switch to convert the DROP_DOWN:KEY in the DROP_DOWN:VALUE
A custom code to reload the TEXT_FIELD
Put in the TEXT_FIELD value option the
But nothing..
Hoping in your help.
Regards
Luca
Or .. better.. I'm not able to apply the CF4 FAQ'S to CF6..
I also read this FAQ on how to use the Variable ShortCode.
I also triyng this way:
In the DROP_DOWN i set an EVENT on CHANGE to RELOAD the text field.
In the TEXT_FIELD i set the reload option with UPDATE event.
I created an event called UPDATE.
Put inside a switch to convert the DROP_DOWN:KEY in the DROP_DOWN:VALUE
A custom code to reload the TEXT_FIELD
{view:text_field_name}
Put in the TEXT_FIELD value option the
{var:name_of_the_switch}
But nothing..
Hoping in your help.
Regards
Luca
Hi Luca,
When the dropdown value is changed, its value is passed to the reload event, so in the text field "Label" box you can use this:
This will bring you the value of the selected option, but if you want the text then you need a "Switch" function (not event switcher), use it before the "custom code", set the data provider to the shortcode above, and set the values to the same dropdown options, but you will have to replace the "=" with ":"
Now use this in the "Label" field of the text field:
Best regards,
Max
When the dropdown value is changed, its value is passed to the reload event, so in the text field "Label" box you can use this:
{data:dropdown_field_name}
This will bring you the value of the selected option, but if you want the text then you need a "Switch" function (not event switcher), use it before the "custom code", set the data provider to the shortcode above, and set the values to the same dropdown options, but you will have to replace the "=" with ":"
Now use this in the "Label" field of the text field:
{var:name_of_the_switch}
Best regards,
Max
Hi Max. Thank's for replay.
Your hint work, but set the label of the text field... Not the value.
My dropdown options is:
The switch (not switch event) is:
I would like to set the value of the text field with RED or WHITE or BLACK depending the dropdown choice.
Well... Where i must put the code {var:switch_name} in the text_field options to set the value with the color?
Thank's in advance
Luca
Your hint work, but set the label of the text field... Not the value.
My dropdown options is:
1=RED
2=WHITE
3=BLACK
The switch (not switch event) is:
1:RED
2:WHITE
3:BLACK
I would like to set the value of the text field with RED or WHITE or BLACK depending the dropdown choice.
Well... Where i must put the code {var:switch_name} in the text_field options to set the value with the color?
Thank's in advance
Luca
Hi Luca,
You should place it in the "Value" setting then!🙂
Best regards,
Max
You should place it in the "Value" setting then!🙂
Best regards,
Max
HI Max..
I suppose this is the right way.. and I try several time..
But it does not work.
Putting the {var:name_of_the_switch} in the field_text value options does not set the value.
The text field remain empty
I suppose this is the right way.. and I try several time..
But it does not work.
Putting the {var:name_of_the_switch} in the field_text value options does not set the value.
The text field remain empty
Hi Luca,
So the {var:} shortcode does not work in the "Value" but works in the "Label" ?
I could not test this, but it may be because of the posted form data to the reload event, please try to add this code in the "Extra attributes" box of the "Text field":
Best regards,
Max
So the {var:} shortcode does not work in the "Value" but works in the "Label" ?
I could not test this, but it may be because of the posted form data to the reload event, please try to add this code in the "Extra attributes" box of the "Text field":
data-ghost:1
Best regards,
Max
This topic is locked and no more replies can be posted.