Viewing 3 reply threads
  • Author
    Posts
    • #8347
      noobie
      Participant

      Piklist Version 0.9.9.12
      WordPress Helpers Version 1.17.0

      Tried to save an image to the metabox on main sidebar widget but did not work.
      Any ways I can resolve this?

      Code as per below:

      <?php

      piklist(‘field’, array(
      ‘type’ => ‘group’
      ,’field’ => ‘sidebar_section’
      ,’add_more’ => true
      ,’label’ => __(‘Sidebar’, ‘sidebar-section’)
      ,’description’ => __(‘Content’, ‘sidebar-section’)
      ,’fields’ => array(
      array(
      ‘type’ => ‘file’
      ,’field’ => ‘image’
      ,’label’ => __(‘Upload or choose an Image’, ‘sidebar-section’)
      ,’columns’ => 12
      ,’options’ => array(
      ‘modal_title’ => __(‘Add File(s)’, ‘sidebar-section’)
      ,’button’ => __(‘Add’, ‘sidebar-section’)
      )
      )
      )
      )
      );

    • #8351
      Steve
      Keymaster

      @noobie– Welcome to the Piklist community!

      The built in Piklist Demos have an example of a image field in a widget. You can see the code here:
      https://plugins.svn.wordpress.org/piklist/tags/0.9.9.12/add-ons/piklist-demos/parts/widgets/basic-form.php

    • #8355
      noobie
      Participant

      Dear Steve

      Thanks. It is resolved.
      Due to a custom field name “image” which was registered earlier, it caused the issue when I try to do the above.

    • #8358
      Steve
      Keymaster

      Great! Closing ticket

Viewing 3 reply threads
  • The topic ‘Widget Sidebar's Meta Box not saving data’ is closed to new replies.