Please disregard the 'View article...' shown at the bottom of many posts as this is the result of restoring old forum posts from a backup.
File upload field in Forms
Hi,
In 2.4.1, p5 I'm trying to put a File upload field in a form, but I get an error:
Less compiler: external/jquery/addons/less/fileinput.less: variable @swatch is undefined in file XXX/public_html/external/jquery/addons/less/fileinput.less in fileinput.less on line 2, column 9 1| @import "../../../bootstrap3/less/variables.less"; 2| @import "../../../bootstrap3/less/@{swatch}/variables.less"; 3| // Fileinput.less 4| // CSS for file upload button and fileinput widget 5| // ------------------------------------------------ 6|
Any solutions?
In 2.4.1, p5 I'm trying to put a File upload field in a form, but I get an error:
Less compiler: external/jquery/addons/less/fileinput.less: variable @swatch is undefined in file XXX/public_html/external/jquery/addons/less/fileinput.less in fileinput.less on line 2, column 9 1| @import "../../../bootstrap3/less/variables.less"; 2| @import "../../../bootstrap3/less/@{swatch}/variables.less"; 3| // Fileinput.less 4| // CSS for file upload button and fileinput widget 5| // ------------------------------------------------ 6|
Any solutions?
Answers
it's still: define("SWATCH",'custom');
Notice: Undefined index: foto_product
in /XXX/public_html/framework/core/forms/controls/bootstrap3/uploadcontrol.phpon line 190
Notice: Undefined index: foto_product in /XXX/public_html/framework/core/forms/controls/bootstrap3/uploadcontrol.phpon line 200
Notice: Undefined index: foto_product in /XXX/public_html/themes/olmiaroboticstheme/modules/forms/controllers/formsController.phpon line 618
I'm guessing the file is failing to upload for some reason.
- See start thread: it didn't work in 2.4.1 p5, that's the version I started this website with, so no info on earlier versions
- I can use the file manager without any problems, directly or via editor
I replace $form->meta("action", "confirm_data");
You could probably customize the /framework/modules/forms/controllers/formsController.php file by adding this to line #602 (at the end of the 'confirm_data' method:
Then revert your changes to the enterdata method so it sends to confirm_data.
Please bear in mind I haven't tested the above and those changes will be overwritten with any code upgrades.