Forum Replies Created

Viewing 15 posts - 2,116 through 2,130 (of 2,964 total)
  • Author
    Posts
  • in reply to: Switching framework #2806
    Steve
    Keymaster

    @zoker– Thank you for considering Piklist! We really appreciate it.

    1) File Upload: We have a file upload field > It allows images and other file types.
    2) Meta boxes: Grouping files in a meta-box is core to Piklist, and super easy. This doc should help >

    If you want to get a good overview of everything Piklist can do, plus a ton of code samples, check out the built-in Piklist Demos >

    Let us know if this answers your questions, can of course, let us know if we can help you further.

    in reply to: fields scope as per capability type #2805
    Steve
    Keymaster

    @ajayphp– You can just use the standard HTML readonly attribute and set it when the user cannot manage_options. Something like this:

        ,'attributes' => array(
          ,'readonly' =>  current_user_can('manage_options') ? '' : 'readonly'
        )
    
    in reply to: Fatal Error line 368 piklist-toolbox #2804
    Steve
    Keymaster

    @iconmatrix– Thank you for the info, but we still can’t reproduce. I think we need more information.

    -Activate Toolbox.
    -Go to “Develop” tab
    -Check off “Show System Information” and save.
    -Goto Tools > System.
    -Highlight and copy everything in the info box. Email to [email protected] this domain.

    Thanks!

    in reply to: in workflow tab values are not saving #2796
    Steve
    Keymaster

    @ajayphp

    1) WORKFLOW TAB CONTENT: The contents of the Workflow tabs are in regular meta-boxes are settings sections that you already created. This is the code that tells the Tab which DIVs (meta-boxes or sections) to show:

    piklist('include_meta_boxes', array(
        'piklist_meta_help'
        ,'piklist_meta_field_api'
        ,'piklist_meta_field_upload'
        ,'piklist_meta_field_taxonomies'
        ,'piklist_meta_field_featured_image'
        ,'piklist_meta_field_relate'
        ,'piklist_meta_field_comments'
      ));
    

    2) GROUPED / UNGROUPED: When you define a field (i.e. 'field' => 'address_group'), all other field data is saved in an array within address_group. If you don’t define a field, they are saved separately.

    in reply to: workflow tab pre selected on page load #2794
    Steve
    Keymaster

    @ajayphp– Based on your other tickets it looks like you have it working. Please let us know if you need more help.

    in reply to: workflow tab field content file location #2793
    Steve
    Keymaster
    in reply to: in workflow tab values are not saving #2792
    Steve
    Keymaster

    @ajayphp

    We use this code in the demo to show the path of the file being used. It doesn’t do anything except display the path:

    piklist(‘shared/field-api’, array(
    ‘location’ => __FILE__
    ,’type’ => ‘Workflow Tab’
    ));
    

    Workflow tabs currently do not support auto-save or save when switching tabs.

    in reply to: in workflow tab unsaved value are lost #2788
    Steve
    Keymaster

    @ajayphp– Workflow tabs do not automatically save data when switching tabs.

    in reply to: in workflow tab values are not saving #2787
    Steve
    Keymaster

    @ajayphp– Why are you using on_post_status? Do you have a custom post status called “save”? Here are the docs on on_post_status for clarification > Try removing it.

    Also, what is this code supposed to do?

    piklist('shared/field-api', array(
        'location' => __FILE__
        ,'type' => 'Workflow Tab'
      ));
    
    in reply to: Fatal Error line 368 piklist-toolbox #2781
    Steve
    Keymaster

    @iconmatrix– We can’t reproduce. Questions:

    1) Did you update Piklist normally via the WordPress admin?
    2) Are you running single site or multisite?

    in reply to: My field is not saved #2777
    Steve
    Keymaster

    @deon– I don’t think I understand what you want. Can you send a screenshot or drawing?

    in reply to: My field is not saved #2775
    Steve
    Keymaster

    @deon– Does this work? (modified code from WordPress codex)

    $terms = get_the_terms($post->ID, 'category');
    						
    if ($terms && !is_wp_error($terms)) : 
    
      $category_links = array();
    
      foreach ($terms as $term)
      {
        $category_links[] = $term->name;
      }
    						
      $category = join( ", ", $category_links );
    
      echo $category;
    
    endif;
    
    in reply to: My field is not saved #2773
    Steve
    Keymaster

    @deon– Great! Glad it worked.

    This part of the field is telling Piklist to save the data as the term_id, and display the name, which is the way WordPress works (save ID’s).

    ,array(
          'term_id'
          ,'name'
         )
    

    Here’s how you can display the term name:

    $term_id = get_post_meta ($post-> ID, 'category', true); // Get the term ID.
    
    $term_info = get_term_by('id', $term_id, 'category'); // Get the term info.
    
    print_r($term_info); // Display all term info.
    
    in reply to: My field is not saved #2771
    Steve
    Keymaster

    Hi Deon– For most situations you do not have to define “scope”. Piklist will do it automatically for you. Just remove scope from the field:

    piklist('field', array(
      'type' => 'checkbox'
      ,'field' => 'category'
      ,'label' => 'Categorias'
      ,'description' => 'Terms will appear when they are added to this taxonomy.'
      ,'choices' => piklist(
          get_terms('piklist_demo_type',array(
            'hide_empty' => false
          ))
         ,array(
          'term_id'
          ,'name'
         )
      )
    ));
    
    in reply to: Post to post relationship in a frontend form #2770
    Steve
    Keymaster

    @gabzonHere’s a solution from another user >. You can save the Post ID of the related post in a meta field.

Viewing 15 posts - 2,116 through 2,130 (of 2,964 total)