2

I'm working on a site using Drupal 7 with CiviCRM, and I created three CiviCRM profiles and added them to the Drupal user registration/account forms. I was expecting this to add three groups of fields (one with first and last name, one with the address, one with phone numbers) to the form, each with their own title. Which is what it initially appeared to do...

But when I added a bit of styling to the fieldsets — specifically, setting each one off in its own shaded box to make them more visually distinct — to my surprise it turned out that each fieldset was nested inside the previous one! So rather than three boxes in a row, I have a box inside a box inside a box. Needless to say, it doesn't look good.

Why is it structured this way? And is there any way to change it so that the three fieldsets are sequential instead of nested?

BTW, if anyone's curious why I made three profiles instead of just putting all the fields in one, I am trying to have the form visually broken up into small bite-size pieces with friendly titles ("What's your name?", "Where do you live?", etc.) for greater ease of use, which is a priority on this particular site.

Update: I think I've identified that the template that generates this form is /templates/CRM/Profile/Form/Dynamic.tpl, so theoretically it should be possible to make a custom version of it... But having perused the template, I still can't see what in it is making it nest the fieldsets that way! And I have no idea why it would be setup that way in the first place.

1 Answer 1

2

I'm wondering if using a webform might be a better solution. You could have a paginated webform using webform civicrm, that gets the data into CiviCRM. Then on the webform adnaced, do a redirect to the Drupal registration form with the email address prefilled using the Drupal Prepopulate module.

2
  • That might be possible — I do have Webform installed and am looking at using that for some things... But is it possible to have the user registration processed when the webform is submitted, or would it just take them to the regular registration form (with the info pre-filled) and they would have to submit that manually? Ease of use is a big priority on this site, so I want to avoid anything that could be confusing to users...
    – spidersilk
    Jan 7, 2020 at 16:01
  • It would have to go to the user reg form. You could prefil the form with the email address and a user name (I think, from my distant knowledge of prepopulate) Jan 14, 2020 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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