However, if valid, we store the value to be used in the next step which is the submission.Īs for validation, the submission is defined in MyModule_form_alter by adding validate callback named MyModule_form_user_delete_submit. If not an error message will be displayed: Here the function will check against user_field_data table that the id is valid. $form_state->setErrorByName('move_uid_documents', t('Unknown user to move documents')) $form_state->setValue('move_uid_documents', $data) To achieve that we Implements hook_form_alter() in MyModule.module:įunction MyModule_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) WHERE name = :n" but it makes me think this is a problem with all filters, not just search filters. We need to add a field to select another user account to which the document of the canceled account will be moved to. Also note that the 'common pitfalls' page linked in comment 2 is a documentation page for the Search API module, not anything to do with core Search / Views plugin specifically. The form before altering it looks like this ![]() ![]() To achieve that, we need to alter the user account cancel form when building the form, validating and submitting it. ![]() When user account is deleted, those documents may be transferred to another account. Step 4: Usually it will display a custom error message when you attempt to add an article title, which is already used in your Drupal website. EK application has a module that store personal documents for user.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |