FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Add a textbox validation rule via the Custom Fields module interface
#1
Hello,

A newbie question:

I am trying to find a way to check the content of various textbox fiels on my form so as to ensure that they contain a number. If the number has decimal digits, those should be separated by a dot (not by a comma that often people use).

For that, I am trying to use the Custom Fields module. I have created a new field type ("test"), based on the Textbox field type. I would like to add a validation rule that would use a regular expression for the validation of the textbox, which in my case would be "/^\d*\.{0,1}\d*\z/".

I assume that, for an external form I would use something like
rules.push("reg_exp,field_name,'/^\d*\.{0,1}\d*\z/',Error message");
However, how could I do that using the interface of the Custom Fields module? The form that I plan to use this validation on is an internal one.

Thanks in advance for your help!
G.

PS
In the mean time, I have managed to go around the problem. I have used a Hooks rule for "ft_create_blank_submission, end" and an identical one for "ft_update_sumbission, end", which goes through the $_POST fields that should have numbers, checks that the strings have number values, changes the commas to dots and then updates the content of the fieds prior to submission.
However, changing the user input in that way, is something that I would like to avoid.
Reply
#2
An archive of the new model is approved for the bloggers. Post of this kind and bestessays is advanced for the promotion for the archives. Element is filed for the top of the science for all goals for the newly adopted items for the future times.
Reply
#3
Hi,

I just downloaded, unzipped, and FTPed the contents of the downloaded folder to my site. When I point to the URL to which the files were uploaded, I get a blank screen.

The first thing I did was look for an installation folder or file. None exists. I'm owner of best essay writing services portal and I need to get help with my question. I'm so happy when I'm find this website! Thanks!

Second, I deleted the upload, and re-uploaded the files contained in the form_builder folder. No joy

I opened every folder and did a comparison of files and files sizes.. They are exact.

I looked for a themes/default/cache, and the original folder does not contain that. I suspect that the file structure has changed since the documentation was written.

I am out of ideas.

I suppose I could manually modify the config and setting files and create a database manually; however, I would prefer the automatic installation method, so I don't miss something.

Any help is greatly appreciated.

I am on shared hosting with BlueHost. The PHP v. is 5.4.24. Database client version: libmysql - 5.1.73

Regards,
Keith
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)