1

How do I get all form field types (e.g. "textbox," "select") available in Drupal 6?

1

1 Answer 1

4

The core fields are provided by hook_elements so you can just invoke that hook to get a list of all field types in the site using module_invoke_all():

 $all_types = module_invoke_all('elements');

The array keys of $all_types are the machine names of the elements, each of those points to another array containing the element information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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