Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a form with multiples pages. Between the first and the second page I use a page break with a condition based on a field in the first page. It’s working but I wold like to do some work on values submitted by the first page using my own function $form['#submit'][] = 'my_own_submit' before the next pages but ….. all the names of the fields was replaced with numbers ! I don’t know how I can retrieve my fields … I messed something?
In the validate function all the fields keep the name but not in submit function.
If someone can give me an idea
Thanks everyone!
Comments
Comment #1
quicksketchAll submission values are converted to use the "component IDs" internally, since managing the data in the nested original form is technically challenging. They're all flattened to their IDs to make for easier data handling (for Webform, not for users modifying Webform).
If you want to convert from a form_key that you entered to the component ID, you can use webform_get_cid($node, $form_key), though note that form keys are not actually unique, the same form keys can be used within different fieldsets and pages.
Comment #2
sfcamil CreditAttribution: sfcamil commentedHi,
Just to say thank you for your response.
Is interesant that not all the time the formatati data is converted to id's but it's ok for moment.
Thanks
Comment #3
sunshinee CreditAttribution: sunshinee commentedI know this is an older thread, but maybe it will help someone down the road. If you wanted to get all the component names and values from a given submission, you can do something like this:
Comment #4
DanChadwick CreditAttribution: DanChadwick commented