I'm trying to use Umbraco Forms for member signup. I've created a nice little workflow that adds a member, based on the form submit. All great.
However, I'd like to add two things to my form;
Password confirm
Check for email exsists
Is there any way I can extend my form with custom validations to be able to compare two password-fields and (through a controller action) check if someone is allready signed up with current email?
Otherwise, I'm back to building this from scratch..
You could add a new Umbraco Forms Field Type called 'Compare' (something like that) have a field type setting that you can select a field that's in the form already to compare against.
With regards to the checking if the email exists, a work flow that checks against the member service would be easily doable.
Or you could eliminate the need to implement your own data types and just create a controller that inherits from the Umbraco Forms Controller, do all your validating in there as you would with a custom form, if everything is valid return the base action result to continue with the form submission, if false then just update the modelstate and return the current page.
Good suggestions ..
I've been considering creating my own custom field type for the password-compare. I guess I'll be going down that road.
I'd like to do a bit of client-side validation on both issues, so I'm considering the possibility to add a few jquery validations on this specific template as well.
You can also plug in custom validaiton rules without having the create a custom controller... using the event model, let me see if I can dig up an example
Using Umbraco Forms for Member signup
Hi All.
I'm trying to use Umbraco Forms for member signup. I've created a nice little workflow that adds a member, based on the form submit. All great.
However, I'd like to add two things to my form;
Is there any way I can extend my form with custom validations to be able to compare two password-fields and (through a controller action) check if someone is allready signed up with current email?
Otherwise, I'm back to building this from scratch..
Cheers, Niels
You could add a new Umbraco Forms Field Type called 'Compare' (something like that) have a field type setting that you can select a field that's in the form already to compare against.
With regards to the checking if the email exists, a work flow that checks against the member service would be easily doable.
Or you could eliminate the need to implement your own data types and just create a controller that inherits from the Umbraco Forms Controller, do all your validating in there as you would with a custom form, if everything is valid return the base action result to continue with the form submission, if false then just update the modelstate and return the current page.
Good suggestions .. I've been considering creating my own custom field type for the password-compare. I guess I'll be going down that road.
I'd like to do a bit of client-side validation on both issues, so I'm considering the possibility to add a few jquery validations on this specific template as well.
Comment author was deleted
You can also plug in custom validaiton rules without having the create a custom controller... using the event model, let me see if I can dig up an example
Comment author was deleted
There is a snippet here https://our.umbraco.com/forum/umbraco-pro/contour/63699-Forms-custom-validation
Thanx Tim! I'll take a closer look at it, would be nice to use forms for this :)
Cheers, Niels
Comment author was deleted
Depending on your version the location of the event might be different
is working on a reply...