The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.28 (Linux)
|
How to check a file field in Submission Pre-Parser? - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Modules / Other (https://forums.formtools.org/forumdisplay.php?fid=8) +--- Forum: Modules (https://forums.formtools.org/forumdisplay.php?fid=16) +--- Thread: How to check a file field in Submission Pre-Parser? (/showthread.php?tid=5103) |
How to check a file field in Submission Pre-Parser? - garof - Mar 25th, 2015 Hi, I have a FormTools form with 2 file fields, named "PhotoMain" and "PhotoAlt". I have added a text field on the form named "HasPhoto", which I would like to automatically indicate whether the user has added a file in any of the 2 file fields or not. I thought of using the submission pre-parser with the following code: Code: if ($_POST["form_tools_calling_function"] == "ft_update_submission") but that seems to do nothing when an entry is updated. I have also tried to use empty() instead of isset() without any success. Could somebody help (even by pointing me to the right direction)? Thanks! |