WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Cimy User Extra Fields] How can I create radio buttons with cimy? (7 posts)

  1. marikamitsos
    Member
    Posted 4 years ago #

    Hi all,
    I am trying to create two radio buttons with cimy user extra fields.
    They should state the gender of the person to register.
    either boy or girl.
    Furhtermore, these should be required upon registration and will be changed only by the admin once registered.
    I cannot make it work.
    Could someone be so kind as to exactly tell me the steps to follow?
    Thank you in advance

    http://wordpress.org/extend/plugins/cimy-user-extra-fields/

  2. vtxyzzy
    Member
    Posted 4 years ago #

    You need to create two fields with the same Name: GENDER.

    Field 1:

    • Name: GENDER
    • Label: Your Gender:
    • Value: Yes
    • Description: Boy
    • Type: Radio
    • Uncheck: Can be empty
    • Select: Can be modified only by admin

    Field 2:

    • Name: GENDER
    • Label: &nbsp
    • Value: Yes
    • Description: Girl
    • Type: Radio
    • Uncheck: Can be empty
    • Select: Can be modified only by admin
  3. marikamitsos
    Member
    Posted 4 years ago #

    Thank you vtxyzzy for the quick reply.

    There is an issue that came up.

    Although I unchecked "Can be empty" after saving it defaults to checked and cannot be unchecked. This results to NOT forcing someone to select it when registering. After reading the plugin instructions, I found out that "field can be empty" does not work for radio buttons.

    So I tried with a drop down list. But is there a way to put the word "select" in the list (and that not being taken as a choice) so as to make them choose one (boy or girl) cause they tend to forget....

    I hope I make myself clear.
    Thank you

  4. vtxyzzy
    Member
    Posted 4 years ago #

    OK. I think the drop-down idea will work.

    • Name:GENDER
    • Label:Gender:/,Boy,Girl
    • Value:(leave blank)
    • Description:Please select your Gender.
    • Type:dropdown
    • Uncheck: Can be empty
    • Select: Can be modified only by admin
    • Check:Should be eaual to, and enter /&Boy|Girl$/
    • Check:Regular Expression

    I am not sure about the 'Can be modified only by admin' part because a user might make a mistake and then not be able to correct it.

  5. marikamitsos
    Member
    Posted 4 years ago #

    You are right vtxyzzy. It almost worked.

    I slightly changed the expression and now works fine:

    * Name:GENDER
    * Label:Gender:/,Boy,Girl
    * Value:(leave blank)
    * Description:Please select your Gender.
    * Type:dropdown
    * Uncheck: Can be empty
    * Select: Can be modified only by admin
    * Check:Should be equal to, and enter /Boy$|Girl$/
    * Check:Regular Expression

    I am not sure about the 'Can be modified only by admin' part because a user might make a mistake and then not be able to correct it.

    You are right vtxyzzy. I changed it as you suggested
    And for the bonus question: Do you know the difference between a dropdown and a dropdown-multi? I mean I tried the above with more than two options and works just fine.

    Thanx again. Great help

  6. vtxyzzy
    Member
    Posted 4 years ago #

    Sorry, I had a typo in the Regular Expression. It should be /^Boy|Girl$/.

    A dropdown allows only one selection at a time. A dropdown-multi allows one or more selections.

    Please mark this topic 'Resolved'.

  7. marikamitsos
    Member
    Posted 4 years ago #

    Tested and retested. Everything works fine.

    Topic 'Resolved'.

Topic Closed

This topic has been closed to new replies.

About this Topic