1

I want to include two radio buttons to EVERY view's results, so a user can select one of them. This is actually a view with users results. Next to each result the following radio buttons will appear: "Active", "Suspend this member" and "Delete this member". How can I make these radio buttons appear on each view result? Thanks

3
  • 1
    Can you please add more information to your question? A view is not a form, and simply adding a radio button will not turn it into a form. I can help you better if I understand what you're trying to achieve. Dec 3, 2011 at 10:22
  • Well,I have some view's results.On every result I want to appear two radiobuttons,next to each result,so as a user can select one.I hope this is more clear
    – sokratis
    Dec 3, 2011 at 10:32
  • 1
    That's not really what I meant. I assume that clicking a radio button is not a goal in itself; you probably want to do something with the gathered information. What do you want to do with the selected views rows? Are selected rows stored in the user's profile (eg. like bookmarks)? Do you want to perform an action on the selected nodes (eg. publish/unpublish? Something else? (PS. you can edit your question to add the information, that will keep all information in one place.) Dec 3, 2011 at 10:56

1 Answer 1

2

Is it very important to you to have radio buttons exactly like you describe? If not, I can recommend the Views Bulk Operations (VBO) module. VBO is a popular module which allows you to select views rows and perform a certain action on those rows. Each row gets a checkbox and you select the action to be performed with those rows using a select box. Here is a screenshot to illustrate that: Views Bulk Operations Screenshot

I think VBO is by far the most mature option available to solve your problem. If you insist on having the radio buttons in your view and you don't mind writing code yourself, have a look at Views Form Field (interesting, but no releases yet), or Create the "View as form" style (work-in-progress in the Views issue queue).

3
  • Really thanks for your answer,I think Viewsbulkoperations will solve my problem,really thanks for your excellent answer
    – sokratis
    Dec 3, 2011 at 11:54
  • Could I use editable fields for this?drupal.org/project/editablefields
    – sokratis
    Dec 3, 2011 at 11:57
  • 1
    I don't think you can use Editable Fields, because the user status is not stored as a field (I mean "field" as defined by CCK in Drupal 6 or Field UI in Drupal 7). Dec 3, 2011 at 12:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.