Hello folks! New UD user here so I apologize if this is simple stuff. I tried looking through the forums but didn’t quite see anything that matched my inquiry.
Is it possible to dynamically generate additional user input fields based on the selection of a static input field, but before the user clicks a submit button?
Some background info on what I am trying to accomplish (in case it helps):
I wrote a function for adding AD service accounts that uses dynamic parameters. If one of my static params ends up with ‘x’ value, it then triggers a dynamic param to be available when running said function. My exact example being, if the account will have a TargetUse of ‘SQL’, then include a switch param for ‘IsCluster’ Basically I want to carry that functionality over into a UD app that my users can access.
Hello @RomPhreak and a big and warm welcome to the UD forums. Seeming as it’s been 6 hours, here is my 2 pence worth…so having read your question, it’s a very good question. So BEFORE the submit button is pressed…hmmmm, I would say no. But as I hate that word as it seems very negative, do any of your static inputs have a dropdown menu selection? I’m thinking of a plan if they do, else I will have to have a think. Sure this could be done AFTER pressing a submit button to then reveal another set of inputs determined by the output of the first submit values. But as you would like it before will have to put on my thinking cap
I’m not super well versed but is this something that could be accomplished within UDElement? Say, having a Set-UDElement trigger when selecting a value?
Originally for my AD dashboard I was going to try to do something similar but decided to “dumb” everything down as the dashboard is being used by a large portion of people with varying degrees of technical knowledge. Didn’t want anyone to be confused by the options present.
Good morning all, and thank you for your welcoming as well as your replies!
@psDevUK - yes, actually, the static input in question here IS a dropdown selection. I am very curious as to what plan you have thought up! Right right, my backup plan was to do exactly that - trigger another input after submission. It isn’t a total deal breaker if I have to go that route, just would be super cool to have the flexibility.
@K_Summers & @jorf - hmmm, I think I’m picking up what you both are putting down. I haven’t tinkered with either of those ideas too much so I will have to play and see. Thank you for the suggestions!
Hey @RomPhreak I have thought about this myself, but never got round to looking into it. I have a dashboard hosted on github under my psdevuk alias, I am oldskool so I was storing the input to text files from the dropdown selections here…so to help me figure what the user is doing I use the $USER variable to output to a folder in the website directory under their username…I mean it took me a while to realise the full potential of ENDPOINTS.
So man you could nest this input inside a New-UDColumn with an END-POINT and a refresh interval…In-fact this is how I make the SUBMIT button appear on my Purchase Order dashboard, by figuring the enduser has answered enough questions I make a submit button appear…so like you would somehow nest these extra inputs in a hidden DIV with an ID then sync that ID to get the input to appear when the GET-CONTENT of the file produced by the dropdown is right, else they stay hidden…
This is all hypothetically speaking and figuring something to bend the rules when it is not originally designed for…I will have a play with a form to try and prove my theory, if the theiry sounds acceptable