Forum Replies Created

Viewing 15 posts - 1,681 through 1,695 (of 2,964 total)
  • Author
    Posts
  • in reply to: How to get value from settings page grouped fields #3956
    Steve
    Keymaster

    You’re very welcome. Closing ticket.

    in reply to: How to get value from settings page grouped fields #3952
    Steve
    Keymaster

    Yup… that’s a bug!

    Try this:

    $options = get_option('piklist_demo_fields');
    
    echo _('1st Street Address: ') . $options['global_headings_style_group']['ungrouped_address_1'][0] . '
    '; echo _('PO Box, Suite, etc.: ') . $options['global_headings_style_group']['ungrouped_address_2'][0]; piklist('field', array( 'type' => 'group' ,'field' => 'global_headings_style_group' ,'label' => '1st Address (Un-Grouped)' ,'description' => 'An Un-grouped field. Data is saved as individual meta and is searchable.' ,'fields' => array( array( 'type' => 'text' ,'field' => 'ungrouped_address_1' ,'label' => '1st Street Address' ,'columns' => 12 ) ,array( 'type' => 'text' ,'field' => 'ungrouped_address_2' ,'label' => 'PO Box, Suite, etc.' ,'columns' => 12 ) ) )); piklist('field', array( 'type' => 'group' ,'field' => 'global_headings_style_group_2' ,'label' => '2nd Address (Un-Grouped)' ,'description' => 'An Un-grouped field. Data is saved as individual meta and is searchable.' ,'fields' => array( array( 'type' => 'text' ,'field' => 'new_ungrouped_address_1' ,'label' => '2nd Street Address' ,'columns' => 12 ) ,array( 'type' => 'text' ,'field' => 'new_ungrouped_address_2' ,'label' => '2nd PO Box, Suite, etc.' ,'columns' => 12 ) ) ));
    in reply to: How to get value from settings page grouped fields #3949
    Steve
    Keymaster

    That’s because the field names in the two groups are the same. This is not a Piklist requirement, this is a requirement of standard forms.

    Make sure each field name is unique, and it should work fine.

    in reply to: How to get value from settings page grouped fields #3947
    Steve
    Keymaster

    You can remove 'field' => 'global_headings_style_group', if you want and the other fields will save as normal. Let us know if that works for you.

    in reply to: settings save filter #3945
    Steve
    Keymaster

    Great. Closing ticket.

    in reply to: Repeating metaboxes within the same page #3942
    Steve
    Keymaster

    Great! Closing ticket.

    in reply to: settings save filter #3941
    Steve
    Keymaster

    @di_create– Welcome to the Piklist community!

    Since Piklist does everything the WordPress way, you can easily use standard WordPress hooks/filters. I recommend you look at:

    update_option
    updated_option
    update_option_{$option}

    Let me know if that works for you.

    in reply to: File Upload – Undefined item #3937
    Steve
    Keymaster

    @mnlearth– I just emailed you our latest beta to test against.

    in reply to: Missing argument 2 for PikList_Meta::get_post_meta()  #3936
    Steve
    Keymaster

    @zentala– Welcome to the Piklist community!

    We can’t reproduce that error. Would appreciate if you could help out. Please deactivate all plugins except Piklist and see if you still have issue. If not, then activate one by one until you can narrow it down.

    Let us know what you find.

    in reply to: how to change modify position / order of meta boxes #3935
    Steve
    Keymaster

    @ajayphp– You would use a combination of the context, priority and order parameters >

    in reply to: how to enqueue script as per custom field #3934
    Steve
    Keymaster

    @ajayphp– I don’t think this is a Piklist thing. Wouldn’t you use wp_dequeue_script to remove the new version, and then enqueue the old?

    in reply to: Warning: strstr() Empty needle … #3932
    Steve
    Keymaster

    @craigburleigh— You can’t upload PHP files. Please zip up and email to [email protected]

    in reply to: login image #3931
    Steve
    Keymaster

    @ajayphp– Great find! This is fixed in WP Helpers v1.7.1, which is now on WordPress.org >

    Always happy to accept contributions. Currently, we accept SVN patches. Just email them to [email protected]

    Also, leaving a 5 Star review for WP Helpers is another way to contribute. 😉

    in reply to: Warning: strstr() Empty needle … #3928
    Steve
    Keymaster

    @craigburleigh– Welcome to the Piklist community!

    I can’t reproduce your errors. Is there any other code in spectrum-start.php?

    in reply to: Repeating metaboxes within the same page #3922
    Steve
    Keymaster

    Here’s something that should get you started. It can definitely be improved. Like passing multiple args, but this is the quick version.

    Place this function in your main plugin file, or your themes functions.php file. This is where you can define all your field types.

    function my_get_field($field, $prefix = null)
    {
      switch ($field)
      {
        case 'my_first_field':
    
          $field = array(
            'type' => 'radio'
            ,'field' => $prefix . $field
            ,'label' => __('First Field')
            ,'choices' => array(
              'one' => 'One'
              ,'two' => 'Two'
              ,'three' => 'Three'
            )
          );
        
        break;
    
        case 'my_second_field':
    
          $field = array(
            'type' => 'text'
            ,'field' => $prefix . $field
            ,'label' => __('Second Field')
          );
        
        break;
    
        default:
          
          return;
    
        break;
      }
    
      return $field;
    }
    

    Then call it from your parts folder:

    piklist('field', my_get_field('my_first_field', 'my_prefix_'));
    

    Let me know if that works for you.

Viewing 15 posts - 1,681 through 1,695 (of 2,964 total)