This feature request stemmed from this forum post: http://drupal.org/node/49680#comment-166007

With the standard profile settings options, I can choose from:
* single-line textfield
* multi-line textfield
* checkbox
* list selection
* freeform list
* URL
* date

However, I'd like to have the option to create radio buttons in the user profile.

Comments

adixon’s picture

StatusFileSize
new6.3 KB

Here's a quick and only slightly soiled patch that adds both radio-style options as well as multi-checkbox options. Not thoroughly test yet, I just happenned to have the same requirement on a current project.

adixon’s picture

Status: Active » Needs review

So far, so good, changing status to get some feedback.

killes@www.drop.org’s picture

Version: 4.7.4 » x.y.z

new features go into devel version.

webchick’s picture

Version: x.y.z » 6.x-dev
Status: Needs review » Needs work

File to patch: modules/profile/profile.module
patching file modules/profile/profile.module
Hunk #1 succeeded at 38 (offset 12 lines).
Hunk #2 succeeded at 280 (offset 45 lines).
Hunk #3 succeeded at 298 (offset 45 lines).
Hunk #4 succeeded at 485 (offset 54 lines).
Hunk #5 FAILED at 512.
Hunk #6 succeeded at 555 (offset 54 lines).
Hunk #7 succeeded at 563 with fuzz 2 (offset 48 lines).
Hunk #8 succeeded at 583 (offset 48 lines).
Hunk #9 succeeded at 605 with fuzz 1 (offset 48 lines).
Hunk #10 succeeded at 715 (offset 50 lines).
Hunk #11 succeeded at 838 (offset 53 lines).
Hunk #12 succeeded at 847 with fuzz 2 (offset 53 lines).
1 out of 12 hunks FAILED -- saving rejects to file modules/profile/profile.module.rej

bdragon’s picture

StatusFileSize
new7.19 KB

Free reroll, courtesy Patch Bingo

bdragon’s picture

Status: Needs work » Needs review
birdmanx35’s picture

Version: 6.x-dev » 7.x-dev

Feature request -> 7.x-dev.

drdrup’s picture

Tries on Drupal 6.0, but it didn't work right:

patching file profile.module
Hunk #1 FAILED at 38.
Hunk #2 FAILED at 287.
Hunk #3 FAILED at 305.
Hunk #4 FAILED at 506.
Hunk #5 FAILED at 534.
Hunk #6 succeeded at 231 (offset -345 lines).
Hunk #7 FAILED at 239.
Hunk #9 succeeded at 283 with fuzz 1 (offset -343 lines).
Hunk #11 succeeded at 550 (offset -340 lines).
6 out of 12 hunks FAILED -- saving rejects to file profile.module.rej
webchick’s picture

Status: Needs review » Needs work
Freso’s picture

Adding to tracker. Will hopefully be able to give it a glance when I get home. :)

gausarts’s picture

Any workaround for drupal 6? Thanks

mjunaiddar’s picture

Hi,

m usein drupal 5.x; I tried to use the patch but its giving me the following:

File to patch: profile.module
patching file profile.module
Hunk #2 succeeded at 254 with fuzz 1 (offset -33 lines).
Hunk #3 succeeded at 272 (offset -33 lines).
Hunk #4 succeeded at 464 (offset -42 lines).
Hunk #5 succeeded at 491 with fuzz 1 (offset -43 lines).
Hunk #6 succeeded at 534 (offset -42 lines).
Hunk #7 succeeded at 542 (offset -42 lines).
Hunk #8 succeeded at 562 (offset -42 lines).
Hunk #9 succeeded at 584 (offset -42 lines).
Hunk #10 FAILED at 694.
Hunk #11 succeeded at 813 (offset -77 lines).
Hunk #12 succeeded at 822 (offset -77 lines).
1 out of 12 hunks FAILED -- saving rejects to file profile.module.rej

any help please ???

Thanks
Junaid

gomez_in_the_south’s picture

A method to implement radio buttons on the profile page was posted in the thread referenced at the beginning of this post.

See: http://drupal.org/node/49680#comment-633585

berenddeboer’s picture

Version: 7.x-dev » 6.13
Status: Needs work » Patch (to be ported)
StatusFileSize
new3.52 KB

Here a patch that works against Drupal 6.13. Limited testing so far, but appears OK.

agogo’s picture

Its insane this isnt core already.

jpitassi’s picture

StatusFileSize
new4.78 KB

I found an error in your patch. It was not clearing the $options array so all previous options were showing up in the radio button options. I added a fix for it so you can have multiple radio buttons on the profile. I have not extensively tested, but seems to working fairly well.

-Jacob Pitassi
http://www.stauffer.com

bfbishop’s picture

Issue tags: +profile, +radio buttons

I applied and am using your patch. It works great. Thanks for the code.

julie.metivier’s picture

Thank you for your code

beauz’s picture

Thanks, I am using this patch and can confirm it is working well. Can we get this commited?

beauz’s picture

Version: 6.13 » 6.17
Status: Patch (to be ported) » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, profile_radio.patch, failed testing.

mcrittenden’s picture

Title: Profile radio button » Add radio buttons to Profile field types

Sub.

kiyose’s picture

Status: Needs work » Needs review
StatusFileSize
new3.4 KB

I've updated the patch against 6.17.

Status: Needs review » Needs work

The last submitted patch, profile_radios_6_17.patch, failed testing.

damien tournoud’s picture

Version: 6.17 » 7.x-dev
Status: Needs work » Closed (won't fix)

6.x is not open to feature request. For Drupal 7 onward, the profile module is obsolete. Won't fix.

younker’s picture

sivarani’s picture

really "profile.radios.patch" good its works fine for radio button but some error is showing for 'multiple checkbox'.
warning: Invalid argument supplied for foreach() in C:\wamp\www\projects\DRUPAL1\v1.0\includes\form.inc on line 1211.

i need another help, for register page. I need to integrate my own design in registration page how could i . pls i need help.

saraswathy’s picture

Version: 7.x-dev » 6.x-dev
Assigned: Unassigned » saraswathy
Category: feature » task
Priority: Normal » Critical
Status: Closed (won't fix) » Active
saraswathy’s picture

westwesterson’s picture

Assigned: saraswathy » Unassigned
Priority: Critical » Normal
Status: Active » Closed (won't fix)

Install the profile checkboxes module instead of patching core... You can still use css to style things, and you can rearrange checkboxes as if you had used the patch.

saraswathy’s picture

Title: Add radio buttons to Profile field types » vocabulary is not listing
Component: profile.module » taxonomy.module
Assigned: Unassigned » saraswathy
Category: task » bug
Priority: Normal » Critical
Status: Closed (won't fix) » Needs work
Issue tags: -profile, -radio buttons

Vocabularies is not listing in select box it prints an 'Array ' instead of this . this issue is only in my theme
its working fine in drupal other theme . please find the attachment

westwesterson’s picture

Title: vocabulary is not listing » Add radio buttons to Profile field types
Component: taxonomy.module » profile.module
Assigned: saraswathy » Unassigned
Category: bug » task
Priority: Critical » Normal
Status: Needs work » Closed (won't fix)
Issue tags: +profile, +radio buttons

shijianil, I admire you're dedication to solving your problem, but this is not the place to address your concern.

please create a new issue... this problem is entirely different than the one listed in the rest of this thread.

The problem you are having is with your theme, and most likely not drupal core, you should try posting that question in the theme's project issue queue, or try irc

If you are developing a custom theme you can also try posting in the forums.

Posting to this thread you will not receive the help you want for this particular issue.