1

Is there any way to edit a CiviEvent template where I can take price set fields and put them in groupings with specific profile fields (from included profile)?

Reasoning - we are collecting data, which would go into Profile fields. We are also collecting Fees that correspond to those profile fields.

I want it to be grouped like

Profile Field 1 a
Profile Field 1 b
Price Set field 1

Profile field 2 a
Profile Field 2 b
Price Set field 2

Currently I am using jQuery .insertBefore and .prependTo to accomplish this, but it just seems ugly?

Thank you!

Sometimes questions should be right next to the Price Set option on the form - hence our need.

2

I think jQuery is the best way to achieve this at the moment, rather than trying to customise the template, or load a custom template for an individual event. Doing this in jQuery also keeps the logic separated out.

If it's critical that the questions appear in this order, then you can use the introductory message and some creative CSS / JS to hide the entire booking form unless JS is enabled. This is the approach we sometimes take.

  • Thanks John. Have you ran into any performance issues using this approach? I am also considering the need for splitting fields into a 2-col layout. – Zachary May 24 '16 at 1:01
  • Obviously it's not ideal ;] . We haven't hit any significant performance issues doing this. It can take an extra bit of time to load the page, but if it's critical for you that the questions are reordered then it's a reasonable trade-off I think. – John Jun 3 '16 at 8:23
  • That's what I did. I also used some jquery code to make conditional fields. In the end, it was tedious and laborious but it worked well. – Zachary Jun 4 '16 at 4:07

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.