Viewing 2 reply threads
  • Author
    Posts
    • #2015
      zanedickens
      Member

      I was hoping someone would be able to point me in a more elegant and less brute force approach to my particular problem.

      1. I have a numerous custom post types – all award entry forms.
      2. I have five judges who need to score each entry
      3. The judges must not be able to see each other’s scores
      4. The number of questions changes per post type / entry

      At the moment I have:

      A metabox that can only be seen by capability ‘judge’ – which allows all five judges to see the scoring box.

      The scorecard is a select per question (8 in this instance) which the judge then selects and updates the entry (CPT). That’s fine for one judge marking all posts.

      But the problem comes in with 5 judges (who cannot see each other’s scores) and 12 different CPTs with different questions e.g. 5 questions, 7 questions, 9 questions

      Which leads me to making 60 different metaboxes!

      Which is is fine if I didn’t care about the future maintenance of the project or doing it properly.

      I had thought to use the Comment Metabox but I can’t see a way to have anything but a text field :/

      I’d appreciate any suggestions, thanks in advance!

    • #2019
      Steve
      Keymaster

      @zanedickens– Luckily you’re using Piklist 😉

      You can easily save the data to the current users profile. This way you use ONE Post Type form, but save the data as user_meta.

      First make sure that this is at the top of each file:

      $current_user = wp_get_current_user();
      

      Add this to each field:

      ,'scope' => 'user_meta'
      ,'object_id' => $current_user->ID
      

      This should work with the current version of Piklist. If not, email us at [email protected]

    • #2037
      zanedickens
      Member

      Thanks Steve! I’ll give it a go and report back. I’m now using Piklist on two projects and seeing it as an essential part of any future ones. Thank you for all the time and effort you have put in this.

Viewing 2 reply threads
  • The topic ‘Have a Metabox take inputs’ is closed to new replies.