summaryrefslogtreecommitdiffstats
path: root/app/class/form.class.php (follow)
AgeCommit message (Collapse)AuthorFilesLines
2016-09-13Changes to the handling of indirect variables, properties, and methodsMalf Furious1-6/+6
To maintain forward compatability with newer versions of PHP (and since my dev environment is now running PHP 7), this patch is made to address the following breaking change from PHP 5: PHP 7 now uses an abstract syntax tree when parsing source files. This has permitted many improvements to the language which were previously impossible due to limitations in the parser used in earlier versions of PHP, but has resulted in the removal of a few special cases for consistency reasons, which has resulted in backward compatibility breaks. Indirect access to variables, properties, and methods will now be evaluated strictly in left-to-right order, as opposed to the previous mix of special cases.
2016-05-26Add copyright notice to Scrott class filesMalf Furious1-0/+14
2016-05-01Fix to Form::saveFile()Malf Furious1-1/+3
Only log an error if we get an upload error besides err code 4 (No file uploaded)
2016-04-27Add function Form::saveFile()Malf Furious1-0/+41
This is a rework of how the framework handles performing file uploads. Rather than attaching new fields to a form (of type file) and handling them during populate() then saving later, users can call what is essentially a static function and save files in isolation. Since each webform I can conceive using in Scrott at this time won't be uploading more than one file at a time, this model should work nicely moving forward; however can be easily adjusted if need be.
2016-04-27Revert "Add form field type 'file'"Malf Furious1-17/+0
This reverts commit 8ad6e8f9223bd3ee214478b3e1247f9c7d8e91ec. See parent commit message
2016-04-27Revert "Update function Form::populate() to initialize fields added with ↵Malf Furious1-35/+1
Form::field_file()" This reverts commit 1f8b53e426b8c0a1546e9d5c21573be9003cb556. See parent commit message.
2016-04-27Revert "Add function Form::saveUploadedFile()"Malf Furious1-8/+0
This reverts commit 3d493fc75dc6e3593001c2d9dfef26f4c1d79c2c. The way I was wanting to handle file uploads isn't going to fly with a semantic of PHP and POST var mgmt. -.- Rolling back relevant changes to write up something else.
2016-03-29Add function Form::saveUploadedFile()Malf Furious1-0/+8
Added function to form class to move tmp uploaded files to permanent storage
2016-03-27Update function Form::populate() to initialize fields added with ↵Malf Furious1-1/+35
Form::field_file() Set $form->[name] for each file field type setup on the form.
2016-03-27Add form field type 'file'Malf Furious1-0/+17
Add the Form::field_file() function to allow form handlers to specify they expect to receive file from the end-user. This adds data about the file field to the form, but does not yet handle it in the populate function
2016-03-27Alter representation of form boolean valuesMalf Furious1-1/+1
Changed how Form() objects model true and false for boolean fields. Was "true" and "false", is now "1" and "0", respectivly. This is to address how Mysql handles these values as they are pushed to the db.
2015-12-08+ Added bool field type to Form classM1-0/+8
2015-12-06* Bug fix in Form class - populate function -- If a field was set in $input, ↵M1-3/+3
but equal to "", the isset check would not behave as expected
2015-12-05* Form class fields now have the ability to set a default value. Default ↵M1-13/+25
value is applied if the supplied $input array has no key matching the field name.
2015-12-05+ Implemented populate function in Form classM1-3/+97
+ Added helper function in Form class, logError ! Finished Form class for now
2015-12-05+ Added numeric and enum types to Form classM1-0/+37
2015-12-03+ Started Form class definitionM1-0/+35