Skip to main content
deleted 1 characters in body
Source Link
Berdir
  • 83.5k
  • 6
  • 161
  • 207

There is notno good documentation on that form because it is dynamic, any module can implement hook_form_alter() and completely turn it upside down. In your example, the name is added directly by user.module while field_birthday is a field and fields are built in a way that allows them to be displayed multiple times if necessary. That's why they are a container and only inside them is the actual form element.

Assuming you want to parse the actual form, and not the response, you have to go through the form recursively. The function element_children() can help you with that. It returns the keys of all form elements below the one you passed in to that function.

There is not good documentation on that form because it is dynamic, any module can implement hook_form_alter() and completely turn it upside down. In your example, the name is added directly by user.module while field_birthday is a field and fields are built in a way that allows them to be displayed multiple times if necessary. That's why they are a container and only inside them is the actual form element.

Assuming you want to parse the actual form, and not the response, you have to go through the form recursively. The function element_children() can help you with that. It returns the keys of all form elements below the one you passed in to that function.

There is no good documentation on that form because it is dynamic, any module can implement hook_form_alter() and completely turn it upside down. In your example, the name is added directly by user.module while field_birthday is a field and fields are built in a way that allows them to be displayed multiple times if necessary. That's why they are a container and only inside them is the actual form element.

Assuming you want to parse the actual form, and not the response, you have to go through the form recursively. The function element_children() can help you with that. It returns the keys of all form elements below the one you passed in to that function.

Source Link
Berdir
  • 83.5k
  • 6
  • 161
  • 207

There is not good documentation on that form because it is dynamic, any module can implement hook_form_alter() and completely turn it upside down. In your example, the name is added directly by user.module while field_birthday is a field and fields are built in a way that allows them to be displayed multiple times if necessary. That's why they are a container and only inside them is the actual form element.

Assuming you want to parse the actual form, and not the response, you have to go through the form recursively. The function element_children() can help you with that. It returns the keys of all form elements below the one you passed in to that function.