Forums

non_existent shortcode in loop

Fredolino 05 Oct, 2019
Hi,

Under Actions / submit I have an upload files action (upload12).
After that:
Save Data (save_data30)
success: Loop event (loop_event31)
in the body from Loop event: Save Data (save_data44)

Everything works correctly.

There is only one problem with the upload files action.
When a photo is uploaded to the form, it is saved and displayed correctly.
If no photo is uploaded, then the filename "no_image.png" (which is already on the server) should be stored in the database in the "photo" column.

In save_data44 data override I try it with:
photo / {data: non_existent / no_image.png} / on insert

It does not work right. Why is not "non_existent"?

F.
GreyHead 06 Oct, 2019
Hi Fredelino,

Is it non-existent - or is the variable in the data but empty? The tests are different.

Bob
healyhatman 07 Oct, 2019
Answer
{data:field/default}
Default will ONLY be shown if the field DOES NOT EXIST, is DISABLED, or if it's a check/radio that's unchecked and "ghost value" is turned OFF. An enabled field with nothing in it will send an empty string, and default will not be shown. You need to use a switch.
This topic is locked and no more replies can be posted.