PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Would you consider a check box field type for post custom field please?

  1. RichardBest
    Member

    Hi there - The new features in 1.3.x are excellent. Thank you.

    This is no criticism, but one thing I've noticed is the absence of a check box type for the post custom field options. I know one can emulate that with a Multiple Choice field type with only one choice, but the difference between that a check box is that with radio buttons the user cannot easily deselect once clicking it, whereas the user can do that with a checkbox.

    What do you think?

    Cheers
    Richard

    Posted 9 years ago on Sunday November 22, 2009 | Permalink
  2. Richard,
    The checkbox field is a multi-selection field where users could select more than one option. That wouldn't work with the custom field because it only accepts one value.

    Posted 9 years ago on Sunday November 22, 2009 | Permalink
  3. RichardBest
    Member

    Hi Alex

    I'm not sure it has to be multi-selection does it? Couldn't it be configured to allow only one selection, i.e., a user can either click a single check box or it can't? This could be useful not because one's interested in the precise content of the custom field entry but because of knowing that someone has clicked "yes" to a given question. Upon knowing that, by checking whether there is a value for the custom field (which could be anything), one could output certain text, i.e., "if checkbox is clicked (and therefore if the custom field has a value), output text "gobbledeegook".

    Does that make sense, or am I off on a tangent on this one? You can do this sort of thing with the Flutter plugin and it'd be great to be able to do it with GF.

    Cheers
    Richard

    Posted 9 years ago on Monday November 23, 2009 | Permalink
  4. Richard, you can achieve the same thing with a drop down select box that has a yes/no or agree/disagree set of options. I'm not sure there's any benefit to having a single option check box for the custom field. We'll still discuss it and go from there.

    Posted 9 years ago on Monday November 23, 2009 | Permalink
  5. jhayes4
    Member

    I would also find it very helpful to have a check box option for Post Custom Field that passes through a "TRUE" as text to a custom field if the check box is ticked

    In practical terms I have people submitting posts that are events through gravity forms and would like to give them to option to let me know that the event is free or not.

    Example:
    Is the event free?
    Yes [check box]

    Posted 9 years ago on Sunday April 18, 2010 | Permalink
  6. Would a solution for this possibly be the feature of update_post_meta() which allows for arrays?

    Then the field type "check box" as well as "address," and "name" could be possible using and array that would automatically be serialized.

    Posted 8 years ago on Monday January 10, 2011 | Permalink
  7. We do plan on adding support for checkboxes with custom fields, but it won't use arrays.

    Each checkbox will be another row in post_meta and use the same key. WordPress supports multiple values for the same key. That is how we will be implementing it.

    Your theme template would then have to support looping through the multiple values and displaying them properly.

    Posted 8 years ago on Monday January 10, 2011 | Permalink
  8. Kool, that'll work with new plugins after today... (as opposed to our old plugin which uses serialization :-) )

    Posted 8 years ago on Monday January 10, 2011 | Permalink
  9. Glad to hear this is coming! Any time estimate?

    Any suggestions on how I could implement this in the meantime? Perhaps multiple choice custom fields with only one choice, using the same custom field name, and no labels on the ones after the first one in the form?

    Posted 8 years ago on Friday February 11, 2011 | Permalink
  10. We are planning on incorporating this in the 1.6 release. It's too late to work it into the 1.5 release which has a feature freeze and will be released as a final release this month.

    I'm not 100% sure what the best work around would be to accomplish this, it's a bit dicey to make it look good using radio buttons. It may be possible to do it that way, or at least worth a shot.

    Posted 8 years ago on Friday February 11, 2011 | Permalink

This topic has been resolved and has been closed to new replies.