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 Profiles (Moderator: Dave Greenberg) »
  • Custom Fields: Activate a checkbox field based on a radio button value?
Pages: [1]

Author Topic: Custom Fields: Activate a checkbox field based on a radio button value?  (Read 1549 times)

appaulmac

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
Custom Fields: Activate a checkbox field based on a radio button value?
February 07, 2011, 03:31:08 am
I have a custom field setup as three-choices radio button. Choice one is effectively 'no' and the other two are options to choose.

The next field is a checkbox, like a Confirmation box.

I need the checkbox to become active if the radio button choice is either of the two options but not the first 'no' option. And the checkbox needs to be a required field.

Is this possible?

Thanks :)

petednz

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4899
  • Karma: 193
    • Fuzion
  • CiviCRM version: 3.x - 4.x
  • CMS version: Drupal 6 and 7
Re: Custom Fields: Activate a checkbox field based on a radio button value?
February 07, 2011, 10:54:14 am
Hi - you haven't said where these are being displayed - in a Profile on an Event or Contrib Page? jQuery may be what is required. If so run a search on that term in Forum and Blog in case someone has a recipe you can follow.
Sign up to StackExchange and get free expert advice: https://civicrm.org/blogs/colemanw/get-exclusive-access-free-expert-help

pete davis : www.fuzion.co.nz : connect + campaign + communicate

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Custom Fields: Activate a checkbox field based on a radio button value?
February 07, 2011, 12:04:28 pm
Yeap, go for an overrided template and a few lines of jQuery love.

The book chapter on extending civi should help you

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

appaulmac

  • I’m new here
  • *
  • Posts: 3
  • Karma: 0
Re: Custom Fields: Activate a checkbox field based on a radio button value?
February 07, 2011, 01:52:13 pm
Yes sorry, it is part of a profile. I have no problem adding some jQuery to dynamically activate/deactivate the checkbox. I'd also have to use it to make sure the field was completed too wouldn't I?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using Profiles (Moderator: Dave Greenberg) »
  • Custom Fields: Activate a checkbox field based on a radio button value?

This forum was archived on 2017-11-26.