CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • changing checkbox to radio in member price sets?
Pages: [1]

Author Topic: changing checkbox to radio in member price sets?  (Read 1278 times)

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
changing checkbox to radio in member price sets?
September 30, 2011, 11:55:02 pm
If a price set is a membership and one uses the checkbox option rather than radio box,  then it is possible to select more than one membership on the form , leading to an error  upon submission (OK I should have known not to use a check box, but I started off with one item so a checkbox seemed natural, then added the second iterm after the fact.

Is there anyway to modify the field to use radio selector after creating the price field?  Or do you have to start all over?

Merlise Clyde

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: changing checkbox to radio in member price sets?
October 02, 2011, 01:12:19 pm
You can't modify the type I don't think (you can anyhow attempt to edit it and see if that's available), but you could use jQuery to adjust it on the page, but you would need a developer to assist with that.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: changing checkbox to radio in member price sets?
October 02, 2011, 01:51:05 pm
I have successfully changed these by hacking the back-end. I think the difference is only held in a single field which from memory is in civicrm_price_field
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Dave Greenberg

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 5760
  • Karma: 226
    • My CiviCRM Blog
Re: changing checkbox to radio in member price sets?
October 03, 2011, 04:17:38 pm
As Eileen noted, you can change the price set input field type using SQL. The query is:

Code: [Select]
// replace N with the id of the price field you want to change type for
update `civicrm_price_field` set html_type = 'radio' WHERE id = N;

HTH
Protect your investment in CiviCRM by  becoming a Member!

mclyde

  • I post frequently
  • ***
  • Posts: 171
  • Karma: 3
    • International Society for Bayesian Analysis
  • CiviCRM version: 4.2.7
  • CMS version: Drupal 6.x
  • MySQL version: 5.136
  • PHP version: 5.2.16
Re: changing checkbox to radio in member price sets?
October 04, 2011, 01:17:46 pm
Thanks that worked!
Merlise Clyde

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Core CiviCRM Functions (Moderator: Yashodha Chaku) »
  • changing checkbox to radio in member price sets?

This forum was archived on 2017-11-26.