By using the Event Tab on Edit window, we can set dynamic condition for a particular element.
But how if the target element is a custom field (containing text) which has no field ID? How can we define it on the Event Tab setting?
Tia.
Hi adhynagara2,
If it is an HTML input then you can always add an id.
If that really isn't possible then you'd need to use custom JavaScript to identify the value in some other way,
Bob
Thank you, Mr. GreyHead,
Anyway, my knowledge on php or html are zero.
How can I add an ID with the HTML input?
What is the code?
Thank you, Mr. GreyHead.
Now I'm starting to be familiar with the language...🙂
Can you give a bit more help Mr. GreyHead...
The code of my text is
<p>President<br />Student Congress</p>
I've tried to embed the ID code in many ways:
<p>President<br />Student Congress<id='Role'/p>
<p>President<br />Student Congress</p id='Role' >
<<p>President<br />Student Congress</p> id='Role'/>
But none of them works.
I made a Custom Code element and put the text code inside the Code box in Edit Element Settings.
I expect the element will have an ID with which I can define a dynamic event.
Therefore in Events tab of a dropdown field, I can set this condition:
On = Certain Selected Value
Action: Show
Element ID: the ID I've just created.
But unfortunately, it doesn't work.
Hi adhynagara2,
I'm sorry but a <p> tag isn't dynamic and will never change so there is nothing to trigger an On Change event.
If you can explain what you need to do we may be able to help you more.
Bob
Let's say, a user (a tourist) will have to select a hotel from a dropdown field.
In order to choose his preferred hotel, he must be informed about the rate of the hotel, the distance to point of interests, the hotel's facility, and so on.
So I would like the information to be displayed as text outside the dropdown field, according to the user's selection.
Thank you.
There's surely a better way but a quick workaround would be to display the text(rate,distance) in a readonly textbox ou text area..
Hi Fawaaz,
Thanks for the quick workaround. But as you said, Mr. GreyHead has proved that the better way does exist.
Hi Mr. GreyHead,
Thank you for the awesome solution. I'll give the first alternative a try first.
Hi Fawaaz & Mr. GreyHead,
I've just inadvertently found the simplest way to tackle this concern.
Simply put the custom code (which contains the text) inside a container field.
Change its type to "field set" then use its ID to assign a dynamic event from the intended dropdown list.
Voila! The text will be displayed conditionally based on your selection on the dropdown list.