Thread Starter
Arash65
(@pershianix)
I’m doing such stuff when user submits the form and I don’t want to rely on just html5 validation techniques, but you’re right I completely forgot about sanitization_cb 🙂
And what about my second question? How can I achieve that?
Thank you.
Thread Starter
Arash65
(@pershianix)
And another question:
I change the code In the example here about creating a front-end post submission form to edit posts (instead of creation) and now whenever I want to clear a field (delete it’s value), when updating the post, that custom filed remains intact and the previous value is still there.
I know that is because $sanitized_values (from get_sanitized_values( $_POST )) wipes out the keys with empty values. How can I change it so that after sanitization the keys with empty values still be in the $sanitized_values array?
Thread Starter
Arash65
(@pershianix)
Thank you so much! cmb2is awesome!