close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Assigning Validation to Existing Fields

Thread began 11/23/2011 2:18 am by cherry8723424721 | Last modified 12/01/2011 10:12 am by Jason Byrnes | 2103 views | 7 replies |

cherry8723424721

Assigning Validation to Existing Fields

Hi:

1) I have an "Enter Profile" form I designed using WA's "Insert Record Wizard" which is working fine. However, When I try to add DW's "Server Behaviors > User Authentication > Check New User Name" to it, it requires that an "Insert Record Behavior" be present in the page (DW doesn't recognize WA's "Insert Record Behavior" as such)

The problem is that when I add DW's "Insert Record Behavior" to the page, that behavior duplicates WA's "Insert Record Wizard", meaning, the new record is inserted twice. Is there any way around this?

2) I would also like to add a "File Field Validation" widget to the same page. As it is, the file-upload field can be left untouched and I haven't found any possible way to make it a "Required Field". The widget "Required textField" doesn't help at all. Any ideas?

Thank you for your attention

Sign in to reply to this post

Dani Chankhour

1. you probably can add the DW insert SB and remove it afterward.

2. Once you apply Digital File Pro, Additional Bindings can be added to the Bindings Panel that are specific to the File field that you can then apply Not Blank Server side validation.

Sign in to reply to this post

cherry8723424721

Dani:

1) I tried that, but when I remove the DW SB, the "Check New Username" no longer works. It asks again for the Insert Record Behavior. Any other ideas?

2) Could you be more specific as to what Universal Email (Digital File Pro) bindings would add "Required Field" validation to the File Upload Field?

Thanks.

Sign in to reply to this post

cherry8723424721

Dani:

I'm in China, so I'm in a very different time zone. I know you're probably very busy, but I was just wondering whether you had had some time to look further into the validation issues described previously.

If there are any other WA extensions that may help me accomplish those validations, please let me know so that I may try them and buy them.

Thank you for your attention and looking forward to hearing from you soon.

Sign in to reply to this post

Dani Chankhour

What i meant by additional Bindings is that once you apply Digital File Pro, you get additional Bindings that could help you determine if the upload file was selected or if the upload was successful.

I have attached a page that demonstrate how to use the Status Code bindings with Server Side Validation to ensure a file was selected. the tricky part here is make sure the Server Side Validation is listed below the Digital File Pro Code.

In regard to checking new user name, i recommend that you follow this steps to accomplish that:

1. create a record set based on the username when the form is submitted
2. update the insert server behavior to only insert if the number of rows return from the record set is 0
3. you can then use the Show IF Server Behavior in Dreamweaver to display a message if the number of rows > 0 stating that the username already exists

Attached Files
untitled2.php.zip
Sign in to reply to this post

cherry8723424721

Dani:

Thank you for your reply and for sending the sample page. I hope I'm understanding your instructions well. However, I see that the page you sent me has these two lines of code at the top that my page doesn't:

<?php require_once("webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("webassist/form_validations/wavt_validatedform_php.php"); ?>

Please note that I'm not using Digital File Pro; I'm using Universal Email, which is supposed to contain DFP's features (am I correct in assuming this?) You're the Engineer, but shouldn't my page have those "form_validation" scripts in it? And, if so, where do I get them?

I had already solved the Check New User Name issue.

Thank you for your attention and looking forward to hearing from you soon.

Sign in to reply to this post

cherry8723424721

Hey Dani:

I've been trying to follow your instructions, but, frankly, they're a bit esoteric to me. Unfortunately, I'm not a php code writer, which is the reason that I've been buying some WA extensions.

I'm afraid that when you say:
------1. create a record set based on the username when the form is submitted
2. update the insert server behavior to only insert if the number of rows return from the record set is 0
3. you can then use the Show IF Server Behavior in Dreamweaver to display a message if the number of rows > 0 stating that the username already exists -----

you're assuming I know more php than I really do, particularly regarding point #2.

Some clarifications would be highly appreciated.

Thank you.

Sign in to reply to this post

Jason ByrnesWebAssist

IN the insert record behavior, set the trigger to Recordset <your recordset> is empty.


For the error message, use the Dreamweaver show region behavior. this will have a trigger option for recordset <your recordset name> not empty

Sign in to reply to this post

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...