Checkbox checked by default in Field Group

Support General Checkbox checked by default in Field GroupResolved

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #35355
    AnLipAnLip
    Participant

    Hi.
    I have a Field Group for a CPT, one of it's fields is a "Checkbox List" (only one value) related to a Taxonomy (that decides if the CPT is to be listed on a grid on the frontpage, or not if unchecked). This the best way I have found to let the user decide in the backend if a poist is to be listed in his frontpage portfolio or not.

    So : I would like the checkbox to be checked by default everytime the user creates a new post. This way he can decide later to uncheck it to remove it from the frontpage. How ?

    Thanks.

    #35359
    Long NguyenLong Nguyen
    Moderator

    Hi,

    If you are using the Builder, just set the default value to checked by default. Screenshot https://monosnap.com/file/oXwN4AB26TBAVuQ0Vp34HZNPEy3lmf

    #35361
    AnLipAnLip
    Participant

    Thanks Long. No my setup is different, I expressed badly : my field type is a "Taxonomy" with a "Field Type" of "Checkbox list".
    If I tick the checkbox in the post edit page it will show in a grid querying the taxonomy associated. If the checkbox is not checked, then it will not appear on the grid.
    I would like to know how to have this checkbox checked by default.

    Visible here : https://pasteboard.co/P7I7swREVXOH.png

    #35368
    Long NguyenLong Nguyen
    Moderator

    Hi,

    There is no option to set the default value for the field type taxonomy, but you can use the custom setting std for this field in the Advanced tab and assign it to the term ID. Screenshot https://imgur.com/p2kQdKx
    Read more on the documentation https://docs.metabox.io/field-settings/#general

    #35371
    AnLipAnLip
    Participant

    Thanks Long. That worked.

    Note for others : the value "3" on the screen capture you linked to, must correspond to the ID of the taxonomy's value ("Yes" in my case).

    For the record : I finally decided to create two "Radio list" values for the taxonomy ("Visible") : "Yes" and "No". The portfolio grid on the welcome page queries all posts that have the "Yes" taxonomy value. This way the client can decide if the post will show on the Home page of his website.

    #35408
    YasmineYasmine
    Participant

    Just wishing to ask more on this question..

    Are you able to set the "std" as a conditional value based on the value from another list? So for example if they were to choose Paris from question 1 then the suggested STD would be France ? And if this is possible - how do you set it up?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.