The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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.31 (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.31 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.31 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
First form: validation, PHP conversion and file privacy - 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: First form: validation, PHP conversion and file privacy (/showthread.php?tid=21304)



First form: validation, PHP conversion and file privacy - Mortom - Feb 11th, 2017

Hi all,
I am new to Form Tools (v2.2.6) and I am setting up a form to include in a Wordpress page. Some questions have come up, and I would like to ask if you could give me a hand on this:
1- I can't get rsv.js validation to work. My form tag looks like this:
Code:
<form action="http://[mywebsite].pt/ftools/process.php" enctype="multipart/form-data" method="post"  onsubmit="return rsv.validate(this, rules)">
And the header includes:
Code:
<script type="text/javascript" src="http://www.[mywebsite].pt/ftools/global/scripts/rsv.js"></script>
<script type="text/javascript">
var rules = [];
rules.push("required,nome,Por favor preencha o campo Nome.");
rsv.errorFieldClass = null;
rsv.displayType = "alert-all";
rsv.customErrorHandler = null;
</script>
I have checked the rsv.js location and the file is in fact there. "nome" is a field name in the form, as in
Code:
<td width="200px"><label>Nome</label></td>
<td><input maxlength="150" name="nome" size="30" type="text" /></td>
Javascript is enabled in the browser. Might I be missing something else?

2- I have understood that a php form and server-side validation are more powerful, since I am particularly concerned with spam submissions that override any JS validation. How easy would it be to convert an HTML form to PHP and include it in a Wordpress page? Can you link me to a tutorial on that?

3- I have found that uploaded files become public, which is something I would like to avoid. Is it possible to restrict access to them (e.g. only with FTP login or ftools login)?

Thanks in advance,
Mortom