• Resolved joncon62

    (@joncon62)


    Hi @edgarrojas,

    I am using ‘Change Options Depending On a Condition’ on a dropdown field and using an input field to change those options based on a keyword.

    If I type the keyword into the input field the options change as expected, but if I use jQuery to change the input field using val(‘keyword’) the options don’t change. Is there a trigger to kick off the option change? I have tried .trigger(‘change’)… keyup, click etc but can’t get them to change.

    Also if I click into the input field and add a space after the text js put in then the form changes correctly. So it looks like changing val() alone isn’t enough to trigger the change.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author EDGARROJAS

    (@edgarrojas)

    Hello!

    If you change the value with javascript you also need to trigger the input event of the input box, otherwise the plugin doesn’t gets notified that the field changed.

    Also, as a side note, if you are going to manipulate the form with javascript it might be better to use the api, here is an example of how to change the text using the api: https://allinoneforms.rednao.com/knowledge-base/javascript-api/

    Regards!

    Thread Starter joncon62

    (@joncon62)

    I am using your API but I was enclosing $FormField.SetText($value) in a setTimeout() function as at some point I think I needed that, but removing it makes it work. Thanks for getting back on a Sunday!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Trigger for when condition is met’ is closed to new replies.