Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
i am new to using drupal. for to learn drupal aren't there any ways i will to learn it first by practicing it locally before going for more complex things like hosting etc. locally i am running wamp server. but don't know how to use it with drupal. some one please guide me. thank you in advance
I add a block for certain content types that are only available to authenticated and anonymous user, but NOT any other roles which are my premium roles.
include DRUPAL_ROOT ."/Translit.class.php";
$translit = new Translit();
echo $translit->Transliterate('tako');
This code converts the text "tako" to cyrillic "тако". That works.
Now I want to replace this text dynamic with the text of a node-field, let's say the token's name of the field is [node:field_example]
I tried different codes, but the letters where completely disarranged/wrong.. Please help!
I have an 'address' form element. It has a process function that inserts form elements in it, like name, surname, street and so on. I also have two select elements for state and country. The country select has ajax attached to it and all it does is that it will replace the whole address in the form. During this the state select will get it's options in process function . The issue I'm having is that I'm getting form error due to the fact that the old value of state select is not present in the new options fo it after it is rebuild by ajax. I've tried to get around this with value callback for the whole address element, and with element_validate for state select element and tried to set it to NULL with form_set_value if the value wasn't present in the new options, but still no success. I know why is this happening but I ran out of ideas how to get this done.
Here is my address process function:
function address_process_element_address($element, &$form_state, $form) {
if ($element['#show_name']) {
$element['name'] = array(
'#type' => 'textfield',
'#title' => t('Name'),
'#maxlength' => 64,
'#required' => $element['#require_name'],
'#default_value' => isset($value['name']) ? $value['name'] : NULL,
'#weight' => -10,
'#attributes' => array(
'class' => array('name')
)
);
I make a view contains only of car manufacturer logos what I want is when click on a logo take me to a page that will display cars for this manufacturer in a view depending on a link or something. how to make this or to assign some arguments and where? please help, I have searched the net but no good result.
In this case we have two different view the fist one will contain manufacturer logos the second one will be on another page contains all cars from that manufacturer or brand.