This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('form :input').each(function(index, elem) { | |
var eId = $(elem).attr('id'); | |
var label = null; | |
if (eId && (label = $(elem).parents('form').find('label[for='+eId+']')).length === 1) { | |
$(elem).attr('placeholder', $(label).html()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Implements hook_block_info(). | |
*/ | |
function the_aim_custom_block_info() { | |
$blocks['latest_product'] = array( | |
'info' => t('Latest product'), | |
); | |
return $blocks; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<h1><?php print str_replace('[', '<span>', str_replace(']', '</span>', $h1_title)); ?></h1> | |
of <h1><?php print str_replace(array('[', ']'), array('<span>', '</span>'), $h1_title); ?></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = the AIM custom | |
package = the AIM | |
core = 7.x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function the_aim_custom_form_alter(&$form, &$form_state, $form_id) { | |
switch ($form_id) { | |
//apply for job form | |
case 'webform_client_form_38': | |
//get title of current node and insert into webform field | |
$current_object = menu_get_object(); | |
if(isset($current_object->title)) { | |
$job_title = $current_object->title; | |
$form['submitted']['vacature']['#default_value'] = $job_title; | |
} |