1

Is it possible to add custom form elements to node form, when the node form is rendered in panel?

I am using panel page node/%node/edit. When I add content to a region, I select Form and there I select node fields. How can I add some custom form element to region, so it will be part of node form?

I can edit node form with hook_form_alter but I do not know how to edit it when the form is generated in panel.

EDIT: the problem is I have panel layout with multiple regions and each field is maually placed to some region. . How can I place custom form elements (created with hooks) to panel region?

EDIT 2: For now, I can attach to region only standard fields, created on "Manage fields" tab in content type. I cannot add custom form elements from hook to a panel region

thanks for advice

  • hook_form_later should do the Job.. I believe You are altering a form which has nothing to do with where it is enabled... – Anil Sagar Apr 8 '14 at 8:39
  • thanks for the answer. The problem is that I cannot add custom form elements to panel regions. I have edited my question to add this notice. (at the bottom of question text) – tomas.teicher Apr 8 '14 at 8:59
  • "... each field is maually placed to some region. How can I place custom form elements (created with hooks) to panel region?" The question is confusing, it sounds like you've already solved the problem. – David Thomas Apr 8 '14 at 10:30
  • No, FIELDS are placed to panel regions. CUSTOM FORM ELEMENTS are not. Fields are node form elements created on "Manage Fields" tab at content type. As I wrote, I need to place form elements (do not to be node fields) into some region, too. I have added explanation to my question (EDIT 2) – tomas.teicher Apr 8 '14 at 13:59

Your Answer

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

Browse other questions tagged or ask your own question.