I have one form which has 2 fields: 1)UserName 2)Password
I want to customize the error message as per fields i.e. for username it should show "Please enter username" and for password it should show "Please Enter Password" Can anyone let me know how to customize this in WForm.
It's mildly difficult to set custom error messages. Are you sure that setting a hint for your field, so that when users click on it, they see a message like 'Please enter username' isn't more what you want?
Also, you probably shouldn't be collecting usernames and passwords with FormAssembly. It's against our policy to allow you to do so for third-party services ( too much chance of phishing ) and as we don't offer a login service, just doesn't make much sense to do for a registration.
Actually We have one simple html form and there I am using WForm open source javascript library. I have fields there like First Name,Last Name and so on. When I am clicking on submit button I want message to display as "Please enter user name" and "Please enter Last Name". I applied class required with both the text fields. It always shows the message as "Field is required" for both the fields but I want this to be changed according to the field.
Note : I am able to change the display message "field is required" for all the fields by changing this text in "wforms_validation.js" but I am not able to change it as per the field.
Please let me know if you need more clarification on this.
In order to have a custom error message for each field, you will need to: 1. Extend the example error routines ( see examples from within this forum or here: http://code.google.com/p/wforms/source/browse/trunk/customization/wforms_custom_validation.js 2. Change the validation for each field in the html code to run those separate validation routines for each field.