0

I have created a content type in which I have a field that is a select box.
Now I want to change all the default values of that select box.

I know hook_form_alter() will work this, but I have no idea on how to change this.
Is anybody able to give me an idea?

  • Did you add that field using your own module, or CCK? – kiamlaluno Feb 21 '12 at 12:49
2

Just adjust the values of the form element to your needs. Check this http://api.drupal.org/api/drupal/developer!topics!forms_api_reference.html/6#select to see how selects ar build using FAPI.

  • 1
    This is correct, but if the field is a CCK field, there is a easier way. Also, answers that contain a little more than a link are not considered answers, on Stack Exchange. – kiamlaluno Feb 21 '12 at 12:57

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.