I'm trying to make a application portal where users can apply for privileges. There are three fields: System, Department, and Privileges. The user selects what System they want to use, what Department they come from, and the Privileges field should search the database with System and Department as input, then populate the options with a list of Privileges available to that user.
So I set up two database pickers for System and Department, then I wrote two behaviours on both System and Departments. When either of them is updated, the behaviours turn the Privileges field into a multi select, query the database from a REST endpoint, and finally populate the options with the result from the query.
But I think this is way too complicated, and sometimes after I refresh the portal the behaviour cannot be triggered. Are there better ways to do this?
I am looking to solve another issue...but thought I would hop in here and reply...
Are your label/type fields custom fields? They may not be named what you think they are named.
For example, using the "Got Feedback?" form, and inspecting the "What do you like?" field, this name in the HTML is actually "description-good".
Also, I dont think this is a scriptrunner issue, as the javascript you are running should be on some other type of website.. However you should be able to use chrome's developer tools -> Elements -> Inspect
And click the form... Using the "What do you like field" this field is:
<textarea class="textarea long-field" rows="5" id="description-good" name="description-good" tabindex="-1" readonly="readonly"></textarea>
I dont know if that is what you issue is, but if the other fields are being filled in correctly and without issue, I would guess the HTML name isnt what you think it is.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.