2

I'm using Profile2 and Profile2 registration path module and I created two profiles.

I want to display their registration form in user/register page. So two forms in one single page.

I set their path to user/register but these forms merged together. But what I want is two separate forms.

Like this:

enter image description here

Any suggestions?

  • Why you want 2 separate registration form on a same page. – DRUPWAY Dec 14 '15 at 10:07
  • I edited my question, check the img – Corentin Branquet Dec 14 '15 at 10:17
3

You can do it simple, add 2 form concurrent to the page you want ( if they are block put two block in that page) and then with simple Jquery you can handle it with something like below code

(function($){
// change jquery selector with real ones
$('.user-register1,.user-profile-register').hide(); // or you can hide them with css
var selector= $('your radio option selecotr').value();
if(selector==1) {
     $('.user-register1).show();
     $('.user-profile-register').hide();
}
elseif(selector==2){
     $('.user-register1).hide();
     $('.user-profile-register').show();

}

})(jQuery);

This code IS the way how can you achieve it and if you copy/paste it it will not worked till you changes its selector and values with your forms

| improve this answer | |

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