Buy Now
Sign in

Can't skip missing fields in save data action

healyhatman , October 18 2018, 12:13
healyhatman 6
October 18 2018, 12:13 #380894
I want to have a save data action where only the fields that have been filled in will be updated. So naturally in the override I put
field:{data:field}/-
However on one website I just get "Error:0" (super unhelpful). On another site in the debug under the info section for the save data action I get "field has been skipped" but then it goes ahead and updates the value with an empty string anyway.
So what I've had to resort to doing is
field:{data:field/(var:read_data#.model.field)}
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store
GreyHead 64
October 18 2018, 13:02 #380899
Hi healyhatman,
It's a workaround but you could read the saved data record, update the changed fields and then re-save it. That way you do have full control.
Bob
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
healyhatman 6
October 18 2018, 13:03 #380901
Yep that's what I'm doing, at the bottom of my post - read the data, and use the existing data as the default value if the field's form data is empty.
Web developer at SkySpider.com.au
Donations: paypal.me/healyhatman
Professional Work: kamron@skyspider.com.au
Custom CF / CC Plugins and Extensions: skyspider.com.au/store