close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Form validation

Thread began 2/16/2012 9:35 am by bill3786 | Last modified 2/28/2012 11:12 am by Jason Byrnes | 2898 views | 11 replies |

bill3786

Form validation

The site backend has a number of forms for inserting and updating various database columns where the values can only be 0 or 1 and another can only be 1,2,3 or 4

These particular fields have a column type of tinyint(1)

I would like to apply validation to the field as it being entered, in the same way that the validation of the fields work in the registration page.

For example if you try to enter an email address in the email field which is not an email format and then move to the next field a mesage is instantly displayed and the field displays a red background.

Can this be done in the same way for a numeric field to check for an entry of only 0 or 1 and for only 1,2,3 or 4

Sign in to reply to this post

Jason ByrnesWebAssist

you will need to use Spry validation for this, Insert -> Spry -> Spry validation text field.


set it to validate on blur. set the validation type to integer, and set the minimum and maximum values to limit the numbers that will be accepted.

Sign in to reply to this post

sybil_thewriter317416

Insert New Form Errors

Error generating: buildFieldGroup TypeError: ShowIfObj.setParams is not a function
followed by
Error generating: buildColumn, buildFieldGroup, buildColumn, buildFieldGroup,(goes back and forth between these two messsage)
Then a form displays missing the Name, Email and Captcha

Jason, I tried to start a new thread but the Image Verification box was empty.

Help. :-)

Sign in to reply to this post

Jason ByrnesWebAssist

What version of form builder.

This sounds like an error from a previous form builder release that is corrected in the CSS Form Builder 2.0.1 support release 2 version that is available in the support release section of the Form Builder 2 download center page.

you will need to uninstall the current version before installing the newer one.

Sign in to reply to this post

sybil_thewriter317416

any onshnv

I just bought it yesterday. version 2.0.0

Sign in to reply to this post

sybil_thewriter317416

Found It

Hi Jason, I went back to my downloads and scrolled down and found the update you referred to. I'm just extracting it now. Hopefully no more problems.

Sign in to reply to this post

bill3786

Follow on from post no. 2

Added spry validation to all the backend datassist generated insert and update pages.

Only had a problem with the password field on the user update page. Tried to change the spry validation from a required text field to a password type validation using the same parameters as the password field on the registration page.

This would accept a valid password but would blank the password field on submit in the database.

It works ok when I reverted back to a required text validation field but obviously doesnt check for a valid password.

Sign in to reply to this post

Jason ByrnesWebAssist

i would need to see the code in your page to troubleshoot.

Sign in to reply to this post

bill3786

The users_update page has been changed back to text spry validation on the password field and will perform an update to this field ok but obviously does not check for a valid password which is what I want it to achieve when this problem is cleared.

Also after adding spry password validation to the password field on the users insert page this also causes a blank entry for password in the database.

Also my registration page is not passing the phone number into the database. Not done anything to this page recently other than some time ago added company name and two extra address fields. After looking at the code is there a problem with the tab index value?

Attached are the users_update, users_insert and registration pages.

Attached Files
registration.zip
users_Insert.zip
users_Update.zip
Sign in to reply to this post

Jason ByrnesWebAssist

for the users update page, i need to see the code that doesn't work after you have changed it.


for the insert page, the Insert Record behavior is expecting the password form element to be named "UserPassword", you have named it "password" when changing the form element type, it's important to copy the name of the original form element, and re use that name for the new spry element that you replace it with.

change the password text field:

php:
<input type="password" name="password" id="password" size="32" />



to:

php:
<input type="password" name="UserPassword" id="UserPassword" value="" size="32" />






similar problem with the phone field on the registration page, the insert behavior is expecting the phone field to be named "Registration_group_1_Phone", but the form element on the page is named "Registration_group_Phone".

on the server behaviors panel, double click the Insert Record behavior, on the second step of the insert behavior, select the Phone number column of your users table, then click the lightning bolt, in the data bindings, select the Registration_group_Phone form element.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...