Additional Validation rules

conticreative 13 Jun, 2012
I was trying to validate a few fields in a form I am building but hoile not extraordinary they are not included in the validations available in the field interface.

Specifically, I was trying to validate the following:

1) validate for field length: Here I need to validate a VIN number which has to be alphanumeric and 17 digits long. It would be nice if I could validate against characters other than alphanumeric, but at least I would like to be able to validate against longer or shorter lengths or number of characters.

2) ASince a lot of bots these days ar smart enough to bypass CAPTCHA, I also like to add a couple of homespun human validation, such as 8+2=? or similar. How can I do that in Chronoforms?

Thank you
GreyHead 13 Jun, 2012
Hi conticreative,

1) You can validate a length of 17 characters by setting the input Class to validate['length[17,-1]']
I'm not sure what you mean by "validate against characters other than alphanumeric"? There is an AlphaNum validation checkbox on the element Validation tab.

2) Please check this FAQ for a way to set up a 'Math Captcha'.

Bob
conticreative 13 Jun, 2012
Thank you Bob. I really appreciate your help.

Just to clarify the second issue (Alphanumeric rule), what I meant was to have a rule that allowed only numbers and letters and did not allow characters like dashes, underscores, etc. I probably should have been more specific. I apologize.

Would the alphanum checkbox do that?

Thank you again.
conticreative 13 Jun, 2012
I have one more question and I'll be happy to make a new post if necessary.

I am building what is essentially an estimate form for an auto body shop. One of the features is the ability for the user to upload a picture with their submission.

However, I don't want this picture to upload in the file system. I'd like it to be saved above public_html. However, I wasn't able to find a way to accomplish that. Is it possible at all?
GreyHead 14 Jun, 2012
Hi conticreative,

It's possible but depends on what your web host and/or server settings allow.

ChronoForms lets PHP handle the upload to a temporary folder and then moves the file to the folder you designate - it should handle a move to a folder above the site root if it has the necessary permissions.

Bob
conticreative 14 Jun, 2012

Hi conticreative,

It's possible but depends on what your web host and/or server settings allow.

ChronoForms lets PHP handle the upload to a temporary folder and then moves the file to the folder you designate - it should handle a move to a folder above the site root if it has the necessary permissions.

Bob



Thanks Bob. We are currently on a dedicated server, so that wouldn't be a problem, but the site eventually is going to move to a shared environment so I'll have to check on that.

Thank you so much for all your help.
This topic is locked and no more replies can be posted.