Adding accordion to custom field "groups"?

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 1 month ago #150265 by Martin Beaumont
Adding accordion to custom field "groups"? was created by Martin Beaumont
Hi Tuan,

Is it possible to add an accordion around groups of custom fields on larger registration forms?

This message contains confidential information
This is quite a long form and I have 3 Categories of questions (Yes/No) after the core fields. Ideally it would be nice to break those up into groups each as an accordion. 

I've managed to add an accordion around the whole form, but I don't see a way I can do anything within the form ?
Code:
<p>       <button type="button" class="btn btn-primary" data-bs-toggle="collapse" data-bs-target="#collapseExample" aria-expanded="false" aria-controls="collapseExample"> Subscription Form </button>   </p>   <div id="collapseExample" class="collapse.show">       <div class="card card-body">   <?php     echo $this->loadTemplate('form', array('fields' => $fields));   [color=#e74c3c]<<< - this seems to be where the action is but no way to break that up?[/color]     if ((isset($this->fees['amount']) && $this->fees['amount'] > 0) || $this->form->containFeeFields() || $this->plan->recurring_subscription)     {     ?> </div> </div>

I'm wondering if this is possible?

Secondly is there a way within the Display Settings to horizontally align values for a Radio field type? See image attachment.

Thanks, 

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

More
3 years 1 month ago #150278 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Adding accordion to custom field "groups"?
Hello

1. About the field options: Edit the field. set Size to 2 for example and each row will have 2 options displayed. It should address the concern

2. For adding accordion to the form, unfortunately , it is not easy and you would need to have good programming skill to do that. The file you need to modify is components/com_osmembership/view/register/tmpl/default_form.php (but as I said, it is not something quick and easy).

Tuan
The following user(s) said Thank You: Martin Beaumont

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

  • Martin Beaumont
  • Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 1 month ago #150284 by Martin Beaumont
Replied by Martin Beaumont on topic Adding accordion to custom field "groups"?
Thanks Tuan,

Re #1 - That fixed the issue. Thanks

#2 - Ok I understand. Beyond my skills :D - It does make me wonder if you might consider a form builder for your extensions? In a similar manner to the RSJoomla products?

So one form builder could build forms for Membership Pro, eDocman & Events Manager - I'm not sure about your other products having not used them "yet" :-) Just an idea ...

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

More
3 years 1 month ago #150285 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Adding accordion to custom field "groups"?
Hello Martin

The extension allows you to add custom fields to form already, so it is actually already already support "form builder". However, if you are are talking about building form using drag and drop fields support, then it is not something which we will support (at least in very near future)

And just for information (in case you really need it), we can build this accordion option for you with the price about 30$ if you really need it

Regards,

Tuan

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