Support

Account

Home Forums Backend Issues (wp-admin) Adding a field to a Sensei completed quiz

Solved

Adding a field to a Sensei completed quiz

  • I’m trying to have a custom field appear below the content of a Sensei completed quiz. The page to grade the quiz has the URL of:

    edit.php?post_type=course&page=sensei_grading&user=1&quiz_id=4332

    When editing the location rules in ACF, I can select “Post Type is equal to Course”, this makes the field visible when editing a course, but not when grading the quiz.

    The dropdown box for “page” when creating the location rules does not have “sensei_grading” as an option. Is this what is causing my issue and can I add that as an option somehow? Thanks for any help with this.

  • In order for fields to appear and for there to be a location the page must be either post type of a taxonomy. The URL indicates a custom admin page

    edit.php?post_type=course&page=sensei_grading&user=1&quiz_id=4332

    This cannot be used for an acf location rule because this page does not call any of the hooks used by ACF for adding custom fields.

    This type of page is similar to the page located at options-general.php. ACF cannot be used to add fields to these places.

    To do this would require altering the template or function that shows the form on the page and using acf_form() with the “form” argument set to false to insert the ACF form between the form tags of the other existing form. Depending on the plugin it might be possible that they provide some type of hook to do this but not in most cases. You need to contact the developer of the other plugin and find out if they provide any mechanism for modifying the form on that admin page.

  • Just to clarify, you wrote:

    In order for fields to appear and for there to be a location the page must be either post type of a taxonomy.

    Did you mean: “the page must be either a post type or a taxonomy?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.