I kind of know the basics about Drupal theming when it comes to templates. However, I have no idea on how to change forms that are used on the site.
I am using Commerce Kickstart with a the Omega Kickstart theme. There are a couple of forms like the search box or the add-to-cart form.
I did some research and came up to something like this for my themes template.php:
<?php
function mytheme_form_alter(&$form, &$form_state, $form_id){
if($form_id == "form_id") {
$form['form_id']['#title'] = t('Something');
}
}
I tried this to change the placeholder that is shown in the searchbar:
<?php
function mytheme_form_alter(&$form, &$form_state, $form_id){
if($form_id == "edit_search_api_views_fulltext") {
$form['edit_search_api_views_fulltext']['#attributes']['placeholder']= t('Something');
}
}
I used edit_search_api_views_fulltext because when I inspect the website code, it shows me the id=edit-search-api-views-fulltext. However, when I use a module that is supposed to print out the ids of forms on the Drupal page, it shows me something like id=views-exposed-form wich didnt work and doesnt seem to be right either.
So my question is how can I access that form and change what I want? And where is the HTML of that form even located? I wasnt able to find it at all.