Skip to content

Instantly share code, notes, and snippets.

@dbarbar
Created October 3, 2013 21:17
Show Gist options
  • Save dbarbar/6817277 to your computer and use it in GitHub Desktop.
Save dbarbar/6817277 to your computer and use it in GitHub Desktop.
<?php
dpm($keyed_components['donation']);
webform_component_update($keyed_components['donation']);
/*
dpm result =
... (Array, 11 elements)
nid (Integer) 48
cid (String, 1 characters ) 2
pid (String, 2 characters ) 21
form_key (String, 8 characters ) donation
name (String, 8 characters ) Donation
type (String, 8 characters ) fieldset
value (String, 0 characters )
extra (Array, 8 elements)
mandatory (String, 1 characters ) 0
weight (String, 1 characters ) 0
page_num (Integer) 1
*/
// But in the DB, pid is still the old value
// What gives?
// dpm inside webform_component_update shows the new value
// both before and after the query.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment