[Résolu] CRED content form does not save state of select box
This support ticket is created Il y a 7 années et 2 mois. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
Hi, I have a CPT which contains Select Box, where I have a several states, default option is called "Pending" and when I create CPT in administration it will save correctly. But when I save CPT throught CRED content form, the state will not save. I need to have the state, but I don´t want to show it in frontend, it´s just for internal purpose. So how to save this state if the customer fills the CRED form without the select box. I thought that WP Toolset will automatically save the "Pending" state, because it is default option. Can you help me solve this problem? Thanks.
Actually no this wouldn't work as intended because the field is not on the form so its not being processed to recognise the default value.
What you can do however is to add a hidden generic field type and set it to the default value of that select field giving it the same slug as the select field.
This field won't show up on the frontend but when a user submits the form it should populate the select value.
Or what you can do is to add the field to the form and hide it with some css.