Hello,
I would like to define a new field and set a value for it programmatically using the gform_post_submission hook.
Is this doable ?
Best regards,
Antoine
Hello,
I would like to define a new field and set a value for it programmatically using the gform_post_submission hook.
Is this doable ?
Best regards,
Antoine
Hi Mediana,
If you could share some more details about what your end goal is I might be able to better answer your questions. :)
I use a form to publish new posts and I have to use a function define the taxonomy triggered by a hook at submission time rather than adding a field to the form, passing the value in the shortcode and hiding the field to the user using CSS. It would be more secure.
Is this clear enough David ?
Fields can't be added to the form programmatically. The field would have to exist on your form in order for you to dynamically populate it. I'm still not entirely clear what you are trying to do based on your description. You wouldn't have an infinite number of taxonomy types so there is no reason why you can't add a field for each taxonomy type and set their visibility to admin only and then populate them via the shortcode. Then the user wouldn't see them on the form.