Try our conversational search powered by Generative AI!

Adding a accept checkbox to all instances of forms


Anyone have a prefered way of adding a checkbox (which has validaiton on it to be checked) to all instances forms?

Extend and create a new form and change the template to include checkbox + validation?

Create a block element and always add this somehow to all instances of a specific form type?

Just help user by somehow always adding it to the element list (still removable)?

Feb 26, 2018 15:40

You can hook into the ContentCreated event and add your element when a Form newly created. Is that solving your problem?

Feb 28, 2018 5:19

Yeah I think it does. Do you happen to have any documentation/examples of this. For the event I guess "formsSetupCompleted" is to be hooked in an InitializationModule. How do I add the my element afterwards?

Feb 28, 2018 8:37

"formsSetupCompleted" is javascript event hapen when the form already rendered. It is not for adding element as your requirement.

At the InitializationModule you need get the instance of IContentEvents ( by using ServiceLocator, it allows you hook into CreatedContent event. In there, you should check if the content created is your Forms then execute code for adding some initial elements into it.

Edited, Feb 28, 2018 8:47
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.