1300 SIGN HIRE
2021 upload

Global Variable hidden section

Objective 1, set upload field dynamically
The source of above values are contained in spefic entries of another form, referenced by "product_id", hence need to be set dymaically.
But they do not necessarily has to be a form field here. Only shown here for explaination.
There are about 6-7 combination of these variables, or 6-7 different kind of products, so its not end of the world if they are handled with purely with codes (i.e. switch)

Thumbnail withdh height controls the thumbnail displayed after upload
Resize withdh height controls the size of file actually gets saved and emailed

Objective 2, special upload JS & validation
for each image uploaded with repeater below, a JS function needs to be called and calculate and populate brightness value field. then corresponding response message can be displayed conditionally

i.e. "too bright" if brightness value above 50, "" if brightness below 50
JS code example here https://gist.github.com/vincentorback/011ef128acfbf846b825

then a custom validation hook need to stop submission for any image's brightness value above the global pass value.
note: the brightness value should be hidden not shown on front end, and it needs to be saved with every entry.

Repeater

Maximum upload size: 3MB
conditionally display value based on brightness value