To delete/edit selected rows from tableselect and have something to work in in form_state you should add keys to your array in your form like:
To delete/edit selected rows from tableselect and have something to work in in form_state you should add keys to your array in your form like:
Setting a session in Drupal is easy, everything is set from the Drupal boostrap, all you need to do is to set it and get it. Like
$_SESSION['zip'] = $form_state['values']['zip_code'];
and latter you just get value on some page like
$view_filters['field_zip_range']['value'] = $_SESSION['zip'];
function custom_views_pre_view(&$view) {
if ($view->name === 'pricing') {
$view_filters = $view->display_handler->get_option('filters');
$view_filters['field_zip_range']['value'] = $_SESSION['zip_code'];
$overrides = array();
$overrides['filters'] = $view_filters;
foreach ($overrides as $option => $definition) {
You can alter views, alter queries and much more. Problem with documentation online is that is lacking some crucial information.
Currently I am using a https://drupal.org/project/ctools_automodal for my modal forms, that use CTools and its form dialogs for nice overlay forms (well not so nice, they look ugly as hell, but you can theme things :) ).
Sometimes you will have a WSOD and nothing to show for. One simple solution to get what is a problem is to insert the following lines into the Drupal's index.php, that should set PHP to report all errors.
If you are not using a date module and just want to use date field from form api, you will want to insert it into DB, probably as timestamp. So to convert that value to timestamp you need to use some precoding for that. In this example we also use a simple textfield to enter time value and add it to timestamp. Also take a note we are using timezone value.
$uid = 1;
$result = db_query('SELECT n.nid, n.title, n.created
FROM {node} n WHERE n.uid = :uid', array(':uid' => $uid));
Fetch next row as a stdClass object.
$record = $result->fetchObject();
Fetch next row as an associative array.
$record = $result->fetchAssoc();
This 2 videos cover most of what you need to know about the Search API, Facets API, Apache Solr Search and Open Layers.
http://www.phase2technology.com/blog/maps-geocoding-search-talk-at-dug-…
I was going nuts over how to install CURL on 64 bit windows. I need it for some module and just enabling it from Wamp panel didn't work. So I searched for solutions and there are quite a few combos and solutions offered online but the only thing that worked for me and what was needed is