Vulnerability in EPiServer.Forms
I want to know if it is possible to do something like below:
I want to create some cutom form elements which will be fixed and important for my form to execute a particular functionality. So instead of user to create them and then put the correct configuration they just add the custom form element and no need to configure anyting for it.
For example: Instead of textbox form element i create a textfield where i have to put the field name to be FirstName, and make it a required, i would create a First Name Field in there, and all the options would be already pre-set for the editor (and probably not changeable) and for rest of the fields they can use the existing textbox form element.
Is it possible to achieve this as form elements of form container.
Override the method SetDefaultValues when you create the custom element. In that method you can set default value for any property of the element.
Thank you, i was able to do that but is there a way to not let user change the values which i set through SetDefaultValues.
You can try to add the attribute [Editable(false)] to the property which you want to disallow editor change.