close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

My automatic, wizard generated form 'Registration', has a postcode window that will only allow 2 digits, Australia needs 4. I have gone into the data table and changed from integer to varch and made it 15, But on the last 4 attempts at creating thi

Thread began 5/28/2013 4:45 pm by dee | Last modified 6/06/2013 5:43 pm by CraigR | 1717 views | 11 replies |

dee

My automatic, wizard generated form 'Registration', has a postcode window that will only allow 2 digits, Australia needs 4. I have gone into the data table and changed from integer to varch and made it 15, But on the last 4 attempts at creating this form

Hi
I found the postcode window security will not accept more than 2 digits. I am using my own database table and have gone into it and changed the ?(whatever it is called) to Varch 15. It is marked as needing to be filled to submit the form.

After the Varch change I have create the form twice now and though my changes are still there the form will only allow 2 digits in the postcode window.

Please help as I believe I am so close to completing this 'Double opt in Registration'.
High regards
Deeanna

Sign in to reply to this post

CraigRBeta Tester

Don't know if it helps in your case, but this could be down to validation.

Take a look at this thread http://www.webassist.com/forums/posts.php?id=26395

Sign in to reply to this post

Jason ByrnesWebAssist

If you still need assistance, send a copy of the registration page.

Sign in to reply to this post

dee

Australia Postcode Validation problem. Where the form only allows 2 digits when Australia needs 4.

Hi Guys,
I looked and the thread Hmmm very impressive thread but I do not know where it goes or if it is to substitute all or part of other code.
i'll send my (part css done) Registration page. I have looked through all the 'Dependent files on the grey strip in DW and still do not recognise anything.

Thank you for your assistance, I believe this may solve this problem.
Regards
Deeanna

Sign in to reply to this post

dee

the Final Global statement?

Given I am using my own fm_reg table for my 'Double Opt in Registration System, should my global statement after the opening php be....
global $row_SecurityAssistfmreg;??
Regards
Deeanna

Sign in to reply to this post

CraigRBeta Tester

Hi Deeanna,

You forgot to attach your page.

I am keen to help you resolve your problem, but don't want to burden you with stuff you aren't comfortable with.

To see if the problem is one of validation, you should have some sever validation code on your page, or on the redirected page after posting
If it is there, you can comment out the validation for zip code, and if the page works ok, then this looks like the problem.

the line will look something like...

$WAFV_Errors .= WAValidateZC(((isset($_POST["postcode"]))?$_POST["postcode"]:"") .....etc);

If this is the problem, I can help you use the modified function to get the validation working

Sign in to reply to this post

dee

Hi Craig, Thank you. I have sent the Reg page a couple of comments earlier. But I will look for this needle in the haystack in the mean time.

Hi Craig,
Thank you I am new to web development but am keen to learn. I've been steadily building my website over the past year.

And I do not yet fully understand the backend. So my trust in WebAssist is totally complete. And I haven't been let down as yet.
So thank you so very much.

Regards
Deeanna

CRIAG, - I found it!!!!!! yes!! I feel so clever..Here it is below.

$WAFV_Errors .= WAValidateNM((isset($_POST["Registration_group_postcode"])?$_POST["Registration_group_postcode"]:"") . "","","",0,",.",true,7);

So what happens with this now, is it to be expanded into the other programming you showed in the above 'thread'? or replace? and what about the extra param?

happy
Deeanna

Sign in to reply to this post

CraigRBeta Tester

Ok, I am a little bit confused, as the validation rule you posted looks like a number validation, not a postcode validation.

Did you try commenting out or removing the validation for the postcode to get the form to work properly ?

Here's how server validation works...

When the form is posted, the value from the (eg postcode) field is passed into a function (lets say WAValidateZC) and tested against certain parameters, which, if it conforms, creates no errors.
If all of the fields to be tested generate no errors, the form is processed, otherwise the error is flagged and the user is directed back to the original page.

There is a standard webassist function for validating zip code called WAValidateZC and this can be accessed by going to server behaviors and choosing add, then webassist->validation->server validations.
The problem is the standard WAValidateZC validation only checks for 5 and 9 digit us, Canadian and UK postal code formats.
I needed to validate for AUS and NZ formats too, but the function can't cope with this at present, and you cannot do it via the server behaviour interface. you need to code by hand.

So, here's what I did...
To start with, I created a standard postcode validation using the Webassist validation for Zip Code by adding this server behavior via the interface.
I then tested it thoroughly using various US and UK postcodes/zipcodes

The validation functions are on a page called wavt_scripts_php.php which is stored in the webassist/form_validations folder.
I created a modified version of the function to take in a 5th parameter, (AUS/NZ postcode), called it WAValidateZCNew and added it to the bottom of the wavt_scripts_php.php page and saved the page.
(I posted the code for this in another thread)
I then found the line on my page which was validating the code and made 2 changes to it
1 I renamed the function to WAValidateZCNew
2 I added the extra parameter 'true' to the line.

so as an example...
$WAFV_Errors .= WAValidateZC(((isset($_POST["postcode"]))?$_POST["postcode"]:"") . "",true,true,true,true,true,13);

becomes

$WAFV_Errors .= WAValidateZCNew(((isset($_POST["postcode"]))?$_POST["postcode"]:"") . "",true,true,true,true,true,true,13);

With these changes in place, my form successfully validated all of the postcode formats

Sign in to reply to this post

dee

Hand coding WA zipcode for Australia problem?

Is this something I can do?
If you think so and are ready for 'dumb' questions, I am willing to make it work.
I know you are on holidays at present and deserve to have a great break so, I will look over and study your words and try to become familiar enough be brave while I wait your reply to "if you think I could actually do this"!

Remember my problem is my Reg form will only allow 2 digits anything more and "its too long = errror"!!

Regards
Deeanna

Upon looking I can locate the coding that needs to be replaced, but how to I add the extra param? I can open the validation window from the Server
Behaviors but what do I do with the window?

You have been kind above I really thought I found the coding earlier.


dee

Sign in to reply to this post

CraigRBeta Tester

Further to my last post, please read it carefully

Did you try commenting out or removing the validation for the postcode to get the form to work properly ?

Do this first. If this doesn't help, then it isn't (only) a validation issue

As i mentioned in my last post, the function can't cope with this (AUS/NZ validation) at present, and you cannot do it via the server behaviour interface. you need to code by hand.

Back up your existing pages, so in the event you make some mistakes, you can always go back to where you were.

Assuming validation is the problem...

To start with, create a standard postcode validation using the Webassist validation for Zip Code by adding this server behavior via the interface.
Test it thoroughly using various US and UK postcodes/zipcodes

The validation functions are on a page called wavt_scripts_php.php which is stored in the webassist/form_validations folder.

Add WAValidateZCNewto the bottom of the wavt_scripts_php.php page and save the page.
(I posted the code for this in another thread)

I then found the line on my page which was validating the code and made 2 changes to it
1 I renamed the function to WAValidateZCNew
2 I added the extra parameter 'true' to the line.

so as an example...
$WAFV_Errors .= WAValidateZC(((isset($_POST["postcode"]))?$_POST["postcode"]:"") . "",true,true,true,true,true,13);

becomes

$WAFV_Errors .= WAValidateZCNew(((isset($_POST["postcode"]))?$_POST["postcode"]:"") . "",true,true,true,true,true,true,13);

This line is hand coded, you cannot do this via the server behavior interface

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