How do I raise ValueChanged Event on Custom Javascript Controls?

denhan
edited October 8 in Javascript Controls

I've implemented a custom JS form Data Control which I use in a Data Repeater and pipe the output directly to a custom Flow Structure which is the input to the Data Repeater. This functionality works fine and I can get the value I need from the js control.

I need to attach a Decisions "Value Changed" event listener to the js control to kick off an Active Form Flow and ultimately set validations on the control based on the input.

My initial thought was to implement the attachEvents() prototype function on my control, but I can't seem to get it right.

Does anyone have an example implementation of a custom JS control which allows you to attach a trigger AFF in the form designer?

I've scoured the documentation articles, but none addresses this specific need. Perhaps my, albeit limited, understanding of JS Controls is wrong?

Thanks for any help you can provide :)

Comments

  • Hi Denhan,

    To set validation on the custom JavaScript control within the Data Repeater, make sure that the Active Form Flow (or event button to trigger it) is created within the Repeater designer, not the parent form designer.

    In the Repeater designer, you can configure the Active Form Flow to trigger on the 'Value Changed' event, or alternatively, use an event button in the Repeater to initiate the flow when needed.

    I hope this helps! If this approach doesn’t resolve the issue, feel free to contact support@decisions.com for further assistance.

Sign In or Register to comment.