Developer forum

Forum » Templates » Create user - with validation?

Create user - with validation?

Lise T. Pedersen
Reply

I have a form in frontend, where a new user can be created and after that confirmed by the admin - and in the standard template, only password and email is validated. But we need to validate that the other fields is filled out to (e.g. name of the user)

How do I make the other fields required? It is the (old) createuser.html template I am using  - is there a better or more updated template/method I can use, or perhaps some extra scripting in the validation.js ? I can't find any "isRequired" templatetags for the "UserManagement:User.Name.Input" and so on...

Thanks,

/Lise

 

 


Replies

 
Nicolai Pedersen
Reply

You need to do that your self in the template.

You can use the "Required" attribute to do that: http://www.w3schools.com/tags/att_input_required.asp

 
Lise T. Pedersen
Reply

Unfortunately, it is not working satisfying with the other validation in the form - if there is a "required error" in one of the input fields, all other fields is being reset - and you have to start all over again. 

Perhaps others has had the same problem, and found a solution to it? Or other suggestions to things, I can try...

/Lise

 

 

You must be logged in to post in the forum