Continuing to hide dependent field

  • Kathy
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 1 month ago #77504 by Kathy
Continuing to hide dependent field was created by Kathy
I've created some dependent fields that really only exist to make my fee calculations come out right (see joomdonation.com/forum/events-booking-ge...nted-fee-fields.html ). I'd really like to continue to hide them from the users.

Anyone messed around with the Javascript to make some of their form fields hidden?

NB : I did try using the "extra" attribute available, entering hidden="hidden"--but that's just for the form element itself (in my case, I have a label with no checkbox. Same for the css style attribute--both are only wrapped around the form element itself.

Please Log in or Create an account to join the conversation.

More
10 years 4 weeks ago #77573 by James Riley
Replied by James Riley on topic Continuing to hide dependent field
I think you should be able to handle this with CSS. If there is a link you can post to a sample event, I'll be able to help guide you in the css.

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.

Please Log in or Create an account to join the conversation.

  • Kathy
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 4 weeks ago #77594 by Kathy
Replied by Kathy on topic Continuing to hide dependent field
Here's my individual registration
nscfchess.org/index.php/calendar/2016-su...ividual-registration

Each week that is selected as a full week brings up a required checkbox, each of which add $25 to the price (they're only active in individual registration/first group member).

Thanks in advance for any guidance!

Please Log in or Create an account to join the conversation.

More
10 years 4 weeks ago #77665 by James Riley
Replied by James Riley on topic Continuing to hide dependent field
In your /media/com_eventbooking/assets/css/custom.css file, try adding the following lines. Let me know if it works :)
Code:
#field_camp_wk1_first_surcharge, #field_camp_wk2_first_surcharge, #field_camp_wk3_first_surcharge, #field_camp_wk4_first_surcharge, #field_camp_wk5_first_surcharge, #field_camp_wk6_first_surcharge { display:none !important; }

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.

Please Log in or Create an account to join the conversation.

  • Kathy
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
10 years 3 weeks ago #77878 by Kathy
Replied by Kathy on topic Continuing to hide dependent field
That worked wonderfully, thank you! I did have to add more selectors for the group registration, so it ended up looking like:
Code:
#field_camp_wk1_first_surcharge, #field_camp_wk2_first_surcharge, #field_camp_wk3_first_surcharge, #field_camp_wk4_first_surcharge, #field_camp_wk5_first_surcharge, #field_camp_wk6_first_surcharge, #field_camp_wk1_first_surcharge_1, #field_camp_wk2_first_surcharge_1, #field_camp_wk3_first_surcharge_1, #field_camp_wk4_first_surcharge_1, #field_camp_wk5_first_surcharge_1, #field_camp_wk6_first_surcharge_1 { display:none !important; }

Please Log in or Create an account to join the conversation.

More
10 years 3 weeks ago #77890 by James Riley
Replied by James Riley on topic Continuing to hide dependent field
Glad it's working for you, and great job on figuring out the additional element IDs to add :)

James Riley .: EventBooking user since 2014 ::: JoomDonation user since 2016 :.
.: grfx & web design / IT / AV @ St. Therese Institute of Faith and Mission, Bruno, SK, Canada :.

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc