0

I figured out how to add form fields using the buildForm hook. I am adding a select element to a participant profile on an event registration form. Do the values from the added fields get saved when the user submits the form? If so, where can I see them? If not, how do I store them with the other profile info using code? The custom fields feature does not work (DB Error: Already exists) right now or else I would use that.

  • You might want to ask a separate question about fixing your custom fields issue! There is a lot of capability built in for custom fields that is not there for your own manual fields. – Aidan Mar 27 '18 at 14:14
  • @Aidan I have just posted a question on how to solve my custom fields issue. It can be found at link Would you mind taking a look? – ermSO Mar 27 '18 at 15:54
2

buildForm hook is used to add the elements on the form. To store the values of your select element, you need to look at postProcess hook which is called after the form is submitted.

You'll get the submitted select value in $form parameter. Use this and store the value in your expected table.

0

As Jitendra explained you can use the postProcess hook and the $form parameter. The submitted values will be in an array $form->_submitValues.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.