If you do please leave something for me :)
I hope you take something away...
I want to use the address field in a custom form which can be fulfilled with the below code
$form['address'] = [ '#type' => 'address', '#required' => TRUE, ];
This would print the following fields
Now what if we want to hide some the above fields
I need to place a block added by another module on my page. I cannot add it by placing the block on a region. Because there is specific placement on the content region itself
Add the block programatically to the page. We can get the block content programatically on a hook_preprocess function and add it to the $variables to print on the twig template
I need to redirect a form to a specific URL on submit
- Add a custom submit on hook_form_alter();
Use either of the lines below
Just follow this document
You might need to restart PHP so you can do this using the following command (command will change according the PHP version you have).
brew services restart firstname.lastname@example.org
It updated my mysql installation to 8.0.12. Previously I was working with 5.7.22. Now each time I start mysql using the following commands
brew services mysql restsrt
MySQL does not start properly
Most probably the error you will face is
.. ERROR! The server quit without updating PID file
When I run
I needed to add a NOT IN condition with a nested query for the WHERE condition. The usual method wont work
$view->query->where['conditions'] = array(
['field'] => 'groups_group_membership.type'
['value'] => array
 => 'SELECT_QUERY_HERE'
['operator'] => IN
The way that works
Drupal sometimes shows errors as follows
Message EntityMetadataWrapperException: Unknown data property field_activity_status.
Converting a given 3D model (a .obj file) to JSON format
Three js has its own converter now
The converted location in source code
Problem: I have a select element. The options are populated using an array and while populating the select element I want to also set the selected value. How do I do this.
use v-bind:se;ected OR :selected with a boolean expression that returns TRUE or FALSE. If it returns TRUE that will be the selected value. See example below