Timeline for Drupal 7 hook_form_alter and submitting the form
Current License: CC BY-SA 3.0
11 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 14, 2016 at 20:44 | vote | accept | Ian Nato | ||
Jun 14, 2016 at 20:31 | comment | added | rémy | actually this is another question. maybe profile2 will help you. if you want to do it yourself, add another question ! | |
Jun 14, 2016 at 12:37 | comment | added | Ian Nato | thanks but now i am trying to figure out how do i generate the user_id so that it can be inserted into the entity_id field. | |
Jun 14, 2016 at 12:12 | comment | added | rémy | It could be that the user is not created in your hook ... | |
Jun 14, 2016 at 12:11 | comment | added | rémy | the entity in this case refers to the user. so the entity_id will be the userid, see my edit to get the current user's id | |
Jun 14, 2016 at 12:10 | history | edited | rémy | CC BY-SA 3.0 |
added 90 characters in body
|
Jun 14, 2016 at 10:17 | comment | added | Ian Nato | I looked into my database and found that drupal had made a table for the field first_name so i want to insert data into the first_name field but drupal is giving me an error of entity_id does not have a default value. the entity_id field is in that table. | |
Jun 14, 2016 at 9:49 | comment | added | rémy | so - what entity are you trying to insert ? a field revision ???? something seems strange to me here .. | |
Jun 14, 2016 at 8:44 | review | Low quality posts | |||
Jun 14, 2016 at 9:21 | |||||
Jun 14, 2016 at 8:37 | comment | added | Ian Nato | Thanks for that correction but know the error has changed and its as follows ................."PDOException: SQLSTATE[HY000]: General error: 1364 Field 'entity_id' doesn't have a default value: INSERT INTO {field_revision_field_first_name} (field_first_name_value) VALUES (:db_insert_placeholder_0); Array ( [:db_insert_placeholder_0] => john ) in user_registration_form_submit() (line 38 of /var/www/html/lite/sites/all/modules/user_regestration/user_registration.module)." | |
Jun 14, 2016 at 8:25 | history | answered | rémy | CC BY-SA 3.0 |