Skip to content

Instantly share code, notes, and snippets.

View netlooker's full-sized avatar
💻
Vibe Coding 💯

NetLooker netlooker

💻
Vibe Coding 💯
View GitHub Profile
@netlooker
netlooker / d7_form_api_ajax_via_ajax_command.txt
Last active September 24, 2015 12:06
Drupal 7 - Form API - Populating field value by ajax request via ajax_command
<?php
/**
* Implements hook_form_FORM_ID_alter().
*/
function hook_form_id_form_alter(&$form, &$form_state) {
$form['field_text_1']['#prefix'] = "<div id='text-1-value'>";
$form['field_text_1']['#sufix'] = "</div>";
@netlooker
netlooker / 0_reuse_code.js
Last active August 29, 2015 14:11
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console