field_widget_form get value I am creating a custom field and I am looking to get the value of a textfield during node creation. In the callback I need to get the value of the textfield, how do I do this?

function field_zoekproduct_field_widget_form(&amp;$form, &amp;$form_state, $field, $instance, $langcode, $items, $delta, $element) {
      switch ($instance['widget']['type']) {
        case 'field_zoekproduct_field' :

          $element['searchfield'] = array(
            '#title' =&gt; t('Zoek naar een product'),
            '#type' =&gt; 'textfield',
            '#required' =&gt; TRUE,
            '#maxlength' =&gt; 115,
            '#size' =&gt; 55,
            '#weight' =&gt; 0,
            '#default_value' =&gt; 'zoek...',
            "#executes_submit_callback" =&gt; FALSE,
            '#attributes' =&gt; array('onfocus' =&gt; "this.value = '';"),  //when textbox gets focus the default value will be removed
            '#ajax' =&gt; array(
                  'event' =&gt; 'change',
                  'callback' =&gt; 'zoekproduct_zoek_getypte_text',
                  'keypress' =&gt; true,
                  'wrapper' =&gt; 'dropdown-second-replace',
                ),
        );

  return $element;
}
Your callback must look like this
zoekproduct_zoek_getypte_text($form, &amp;$form_state){}

check what values you receive in $form_state or $form