2

I am using Ctools to generate a popup and I'm loading my form inside it. In order to use a textfield with youtube link embedding and image uploading, I am using WYSIWYG module with CKeditor library.

My problem is that, when I define a form field with text_format as type, the values that are given in the field are not retained in the $form_state or $form variables.

I checked by defining the default value, It seems to be retained in the form_state['values'] but any changes that are done to the default value in the rendered form is not reflected.

$form['optional_links'] = array(
    // '#type' => 'textfield',
    '#type' => 'text_format',
    '#format' => 'plain_text',
    '#default_value' => 'unique',
    '#title' => t('Optional: include additional info like link or image that gives context'),
  );

The same form works perfectly with textfield type. I even tried changing the formats but of no use.

  • Had anyone faced this problem? – Bej Oct 6 '17 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.