Set Value Condition (not Set Default Value)

Hi, I’m trying to create a dynamic form, where selecting a certain value in one drop down would set the fixed value elsewhere.

Right now, in the element conditions, it is possible to set the default value. However, if the user already has entered a value in that element, the default value will not override it.

Why isn’t there a “set value” condition in input elements? Do I need to create a workflow instead?

I may be wrong but I’ve always assumed that setting input values directly is not an option for security reasons.

One way around it is to put the input in a group (with a content type equal to the value type you want the input to hold), set the input’s default value to be the group’s value. When a new value is suggested in your drop-down, you can then reset the group’s input (which should clear whatever value the input previously had) and do action “Display data” with the new data you want in the group, so that it becomes the input’s new value. You could also use a custom state in a similar way.

3 Likes

That sounds like a cunning plan! Let’s try.

1 Like

I found that if I set the option sources it will reset the current input:

So IF drop-down-A choice = X THEN drop-down-B choice-source is doSearchFor({my desired option list})

1 Like