Timeline for How do I programatically add a field to a node?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 5, 2013 at 1:09 | comment | added | YassineEdouiri |
please check the new post , coze when i changed the $form['#submit'][] = 'my_module_form_submit'; in the hook mymodule_payment_admin_settings_form i have called the funtion in the submit $form['#submit'][] = 'my_module_form_submit'; then the fields were successfully created(cozwhen i want to re submit the form with the same field name,i get this msg FieldException:Attempt to create field name<em class="placeholder">field_price</em>existing and active.in field_create_field()(ligne 85 inC:\xampp\htdocs\..\modules\field\field.crud.inc),but i can't see the fields in the selected content type
|
|
Jun 5, 2013 at 0:51 | comment | added | YassineEdouiri | i have created an another post for this : (drupal.stackexchange.com/questions/75197/…) | |
Jun 4, 2013 at 23:53 | comment | added | YassineEdouiri |
thanks man ^^ i have removed the $form['submit'] from the my_module_admin_settings_form and instead i have added the return system_settings_form($form); and then following your answer i have created mymodule_form_submit with your code , and then for testing i have added drupal_set_message to see if the module is entering to the hook in the submit or not .. nothing appear or happens to the selected content types
|
|
Jun 4, 2013 at 23:19 | vote | accept | YassineEdouiri | ||
Jun 4, 2013 at 23:53 | |||||
Jun 4, 2013 at 5:38 | history | answered | tenken | CC BY-SA 3.0 |