JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
Feature request:- "Sticky" fieldsAsked by NRCsupport on November 18, 2015 at 05:20 PM
I'd like to be able to define a field as being "sticky". This would mean that if a condition is used to put a value into this field, the field would remain unaltered when that condition is no longer true.
This would make it possible to use a field as a state variable when some actions need to be carried out in a particular sequence. In particular it wouldbe validto alter the field in a condition based on the field itself.
if field X is equal to value1 do action 1
if field X is equal to value1 do action 2
if field x is equal to value1 do action n
if field x is equal to value1 insert value 2 into field x
if field x is equal to value2 .....
All the actions which test field x = value1 would be carriedout before any actions which rest field x = value 2.
By the way, if the field is hidden by a condition it should be left empty in the submission (as for all other fields hidden by a condition). This would mean that on reloading the submission for editing the field would restart from empty rather than containing the value it had when the submission was made.
Not really sure if I have understood your request, since I think what you are looking for can be accomplished with our conditions wizard.
Just to let you know(probably you already know), two or more actions can be done in a condition:
You can also clear values of conditionally hidden fields:
Have you tried this?
The prolem is that if you have a condtion suich as
if (some condition) is true then insert (some value) in (some field),
then the value gets inserted in the field only while the conditon is true. When the condition is false the field gets cleared. This is like most other conditions in that when the tested condition is false the action is reversed, and presumably the reverse of inserting a value is to insert no value (i.e. empty) into the field.
What I want for my "sticky" fields is that once the condition has caused the value to be inserted in the field, the field should retain the value until another conditional statement inserts a different value into the field, whether or not the original condition goes false in the meantime.
I have tried sequences similar to the one shown in my original message. The statement "if field x is equal to value1 insert value 2 into field x" does not work because as soon as value 2 has been inserted in the field, the test in this statement is no longer true and the field gets cleared.
I hope that makes things a bit clearer.
My remark about clearing the field when hidden by a condition was just to make it clear that I do not want this action to be prevented by the "stickiness" of the field. It is important to me that they are still cleared in that situation.
Yes I did know that more than one action can be done in one condition, but only if they are in the same group, and the condition that inserts a value into a field does not allow multiple actions. I have already put in a request that all types of action could be included in a single condition, as I have had several situations where the same rules apply to several conditions because their actions are not in the same group. I have also noticed a weird thing in that some actions (for example hide and show) have the option to include multiple fields, while others such as (disable and enable) only allow a single field in each action. Also strangely in the hide/show group if you are showing some fields and hiding some fields you must either use show (single) and hide (single) or show multiple and hide multiple. You cant have both a single and a multiple in the same conditon. I feel that all this type of action should allow multiple fields, and that the single field option is unnecessary, as you can pick just one field in the multiple options.
I see, I have forwarded your request to ours second level, please note that this can be approved or declined, and if approved, there is no estimated time-frame for it's implementation. You should be notified via this thread if there is any update about this request.