vijaycs85
  • Member for 9 years, 4 months
  • Last seen this week
How to display entity label using entity reference field checkbox form display
0 votes

I assume the context_question is your custom entity or coming from a contrib module? There are two options: Add label key to context_question entity definition under entity_keys so that Drupal\Core\...

View answer
Can not see test modules in module install page
0 votes

Test modules are under module_name/tests/ or module_name/tests/directory and can be enabled by TestDiscovery service. As ExtensionDiscovery::scan() calls TestDiscovery::getExtensions() method with $...

View answer
How to import config and content using config import and hook_update_N
0 votes

One of the workaround is to run database update (hook_update_N) before and after configuration import. In hook_update_N check if your configuration changes are available. In my case, I just need to ...

View answer
#ajax form_set_error
Accepted answer
0 votes

You can try this one: //playground.module function playground_form_alter(&$form, &$form_state, $form_id) { switch($form_id) { case 'webform_client_form_1': global $user; if ...

View answer
Select users with only one role
0 votes

You can try this one: $sub_query1 = db_select('users_roles', 'ur') ->fields('ur', array('uid')) ->condition('ur.rid', '3'); // Role 1 $sub_query2 = db_select('users_roles', 'ur') ...

View answer
Use AJAX on a form with multiple buttons
Accepted answer
0 votes

Just two problem with your form: Remove #value element from 'input' element replace return $return['output']; with return $form['output']; The problem with #value is that the element gets re-...

View answer
Extra handler breaks Datepicker field
0 votes

Looks like the problem is with the CSS rather than the id part. The typical id would be something like this: edit-field-date-und-0-value-datepicker-popup-0 and this id is dynamically generated and not ...

View answer
Rules - New events inside code not shown in interface
Accepted answer
0 votes

The problem is the function name. Since the module name is nodeaccess (and not node_access), function name should be nodeaccess_rules_event_info However, it is not recommended to add anything to a ...

View answer
1
2