The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.28 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.28 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.28 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.28 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
How do I setup required fields with Form Tools? - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5)
+--- Thread: How do I setup required fields with Form Tools? (/showthread.php?tid=870)



How do I setup required fields with Form Tools? - SteadmanTech - Sep 30th, 2010

Seems like it would be simple or obvious but I've searched the site and forums and cannot find any info. Maybe I'm looking in the wrong places?

How can I setup my form and Form Tools to make certain form fields required for submission?

Thanks!


RE: How do I setup required fields with Form Tools? - mrsalvage - Sep 30th, 2010

There doesn't seem to be a lot of users that help out around here. So I am willing to hang out to help myself out and others if I can.

I read where one user thought he found the holy grail of form systems. I have been here for a few days reading like a mad man and I am starting to catch on. I hope I am able in the end to pull off some pretty fancy forms for my sites with what seems to be a fantastic open source app written by Ben.

Anyway here are the docs on how to validate the fields

http://docs.formtools.org/tutorials/php_validation/

http://docs.formtools.org/tutorials/js_validation/

You can see the validation in the demo files when you download them and look at source.

I am not to sure how up to date the demo's are as compared to the new package he just release. So your mileage might vary a little with those demo's.

I think it would be great to add all the demo's to the download of formtools so you knew they were up to speed.

Billy


RE: How do I setup required fields with Form Tools? - SteadmanTech - Oct 1st, 2010

Perfect! Those answered my questions. Thank you!


RE: How do I setup required fields with Form Tools? - mrsalvage - Oct 1st, 2010

(Oct 1st, 2010, 6:54 AM)SteadmanTech Wrote: Perfect! Those answered my questions. Thank you!

Well no... The dev answered your questions with the killer tut. I just pointed!


RE: How do I setup required fields with Form Tools? - drakar - Dec 18th, 2010

Hi I wont to put Really Simple Validation (RSV): Standalone Version in my form.
Can some expain hay to Add your form-specific validation code.

var rules = []; // this stores all the validation rules
rules.push("required,first_name,Please enter your first name.");
rules.push("required,email,Please enter your email address.");
rules.push("valid_email,email,Please enter a valid email address.");

Where to put thet code in page (form) becouse I put end dont work!?
Thanks.


RE: How do I setup required fields with Form Tools? - Ben - Dec 18th, 2010

Hi Drakar,

Yes - exactly. You add that to your form, and then add a onsubmit="rsv.validate(this, rules)" attribute to your form.

It's all covered in that tutorial:
http://docs.formtools.org/tutorials/js_validation/

Good luck!

- Ben


RE: How do I setup required fields with Form Tools? - drakar - Dec 19th, 2010

Thanks, on replay Ben.
Byt can you please tell my where to put thet code in my form:
var rules = []; // this stores all the validation rules
rules.push("required,first_name,Please enter your first name.");
rules.push("required,email,Please enter your email address.");
rules.push("valid_email,email,Please enter a valid email address.");

My form:
............................
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="rsv.js"></script>
</head>

<body>
<table width="38%" border="2" cellpadding="0" cellspacing="0" bgcolor="#666666">
<form action="http://test.kavanali.com/formtools/process.php" method="post" enctype="multipart/form-data" onsubmit="return rsv.validate(this, rules)">
<input type="hidden" name="form_tools_form_id" value="2" />
<tr>
<td colspan="2" align="right"><div align="left"><strong><font color="#FFFFFF"><br>
&nbsp;&nbsp;Vaše ime:</font></strong> &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;
<input type="text" name="name">
</div>
<div align="left"><br>
<font color="#FFFFFF"><strong>&nbsp;&nbsp;Email adresa:</strong></font>
&nbsp;
<input type="text" name="address">
</div>
<div align="left"><br>
<font color="#FFFFFF"><strong>&nbsp;&nbsp;Grad:</strong></font> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<select name="age" size="1">
<option value="vs">vs</option>
<option value="21-30">21-30</option>
<option value="31-50">31-50</option>
<option value="51-70">51-70</option>
<option value="71-100">71-100</option>
<option value="Over 100">Over 100?...</option>
</select>
<br>
<br>
<font color="#FFFFFF"><strong>&nbsp;&nbsp;Your Age:</strong></font>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="Pitanje" value="da">
<strong>da</strong> </div>
<div align="left"> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="radio" name="Pitanje" value="ne">
<strong>ne</strong><br>
<br>
<font color="#FFFFFF"><strong>&nbsp;&nbsp;Unos:</strong></font>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;
<input type="checkbox" name="unos" value="jedan">
<strong>prvi</strong><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;
<input type="checkbox" name="unos" value="dva">
<strong>drugi</strong><br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp;
<input type="checkbox" name="unos" value="tri">
<strong>treci</strong><br>
<br>
<font color="#FFFFFF"><strong>&nbsp;&nbsp;Slika:</strong></font>&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<input type="file" name="file">
<br>
<br>
<font color="#FFFFFF"><strong>&nbsp;&nbsp;Poruka:</strong></font><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;
<textarea name="feedback" rows="6" cols="25"></textarea>
<br>
<br>
&nbsp; &nbsp;
<input type="submit" value="Poslati">
&nbsp;
<input type="reset" value="reset">
<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br>
</div>
</td>
</tr>
</form>
</table>
</body>
</html>

.............................




RE: How do I setup required fields with Form Tools? - Desy231 - Dec 4th, 2017

I'm new to this issue and you helped me.