Developer forum

Forum » Dynamicweb 10 » Custom Create User Form, Inputted data not shown on error

Custom Create User Form, Inputted data not shown on error

Joseph Vause
Reply

Hello,

We have a sign up form, with custom fields, which all works great, however when submitting if there is an error (e.g. User Email already exists) the form refreshes, but the data that has already been entered has been removed. is there a setting somewhere to keep that data? everything is set to the correct form value (as when you do a successful submit, it sets the value on the AccessUser)

Is there also a way of marking a custom field as required?


Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Joseph

You cannot mark a custom field as required - you have to do that in the template.

When you creat a new user, you do a post - that post will render a loop of errors in the create user template. To keep the values in custom fields, you need to read them from the post using request.form["fieldName"] and set the value on the input field.

BR Nicolai

 

You must be logged in to post in the forum