Filling in prompt fields based on other prompts dynamically #2107
Replies: 3 comments 2 replies
-
Agree that this would be a nice feature, sadly not currently possible since policies are only run upon stage completion, you could break the flow up into two separate prompt stage and use the policies inbetween to generate data. For this we'd have to either allow admins to run custom javascript in the flow executor, or send the data to the backend on every keystroke which is also not ideal. |
Beta Was this translation helpful? Give feedback.
-
Thanks for replying. Yes, I eventually split it into multiple stages. However, I was unable to pre-populate the field with an expression policy. I only managed to replace its placeholder. Here are the two expression policies I used:
I do not have an input for the display name, so that is created directly by the expression policy, with no option for the user to change it (except when filling in his first and last name). However, I do have an "username" field, which I would like to pre-fill but still leave the user the flexibility to change it if they desire. Unfortunately, the expression policy only fills in the username as a placeholder and the user is still required to type their username (screenshot & context below) The current plan context:
Is this a bug or expected behaviour? Is it possible to actually pre-fill the username field? |
Beta Was this translation helpful? Give feedback.
-
@sdimovv Does #2397 help your use case? |
Beta Was this translation helpful? Give feedback.
-
Let's say I have the following registration prompt:
It would have been great if we could use an expression policy (or something else) to fill in the
username
field automatically with a suggested value based on input in thefirst_name
andlast_name
prompts while the user is still filling in the form.Example:
first_name
promptusername
prompt fills in with the value of:john
last_name
promptusername
prompt fills up with the value of:john.doe
john.doe
Beta Was this translation helpful? Give feedback.
All reactions