Skip to Content Skip to Menu

Cbsubs registration show field only when specific plan is selected

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 6 months ago - 10 years 6 months ago #244209 by dotcom22

The only solution is to do as Nick suggested and have a default plan that has fields hidden already


I made a test by creating a fake free default plan which hide all fields. Then with CSS I hidden this fake plan for show only my 2 others plan. Then when I choose one plan I'm able now to show/hide only the field I want according to selected plan..great. However the big downside is the Register button + TOS field are always displayed and this is too bad. If user click simply on the Register button without choosing a plan, he will get a message "the field email is invalid" and this is normal because no field has been displayed/filled. So if I change this message with "you must select a plan" this could be fine...but the best would be to hide dynamically the Register button (and even the TOS field) until one of my plan is selected (or if the default plan is no more selected which mean another plan is selected) but I suppose this is not possible.

Maybe is possible to do something with a code Auto-Action ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
Last edit: 10 years 6 months ago by dotcom22.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244223 by krileon
It's possible to add jQuery using CB Auto Actions to hide the other fields and registration button, yes, but I recommend doing a middle-man page instead of bothering with any of this. Create a Joomla article that has buttons to select a plan and describes your plans. Those buttons should link to the plans pages directly, which will auto-select the plan and display registration. This cuts out the need for having everything initially hidden.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 6 months ago - 10 years 6 months ago #244246 by dotcom22
yes this could be a solution. In that case I'm supposed to set in Workflow tab of my plans the value:

No: hide this plan from registration, unless specifically included in url or needed for access

OR

No: hide this plan from registration and from access proposal, unless specifically included in url

for the setting "Propose spontaneously plan at registration".

This is of course annoying because if user try to access something which require a subscription, instead to get my middle-man page he will get a blank registration form.

Is possible to override this ?

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
Last edit: 10 years 6 months ago by dotcom22.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244257 by krileon
You can still display them on registration normally encase they manage to make it to normal registration for whatever reason they still have the ability to select a plan and register. To prevent a bunch of fields showing initially when they do manage to make it to normal registration page you can set 1 to be the default. If the user trys to access a page they need a subscription for it'll ask them to subscribe to the needed plan and if they're not logged in it'll be just like they went through the middle-man page.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

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

  • dotcom22
  • dotcom22
  • OFFLINE
  • Posts: 522
  • Thanks: 14
  • Karma: 4
10 years 6 months ago - 10 years 6 months ago #244278 by dotcom22
ok thank for suggestion.

Please last thing:

I don't know why but when I go to
/index.php?option=com_comprofiler&task=pluginclass&plugin=cbpaidsubscriptions&do=displayplans

or

/index.php?option=com_comprofiler&task=pluginclass&plugin=cbpaidsubscriptions&do=displayplans&plans=2

I get inside as error System Messages the "Access not authorized texts" specified inside the 2 fields in Cbsubs settings > Display > Plan. If I remove theses texts, the red error box remain even without text or html inside. This system message box is generated by the code <div class="error"></div>.

UPDATE: I reverted back my modification because the middle-man page is finally not a solution for me. The default process is the best even if I can not customize exactly how I want.

The last thing I would like implement is to be able to customize backgroud color when a plan is select but keep the default color when un-selected. I was able to change color OnMouseHover and OnMouseClick with pure css like this:

#cbregProduct_1:hover {background-color: #eeeeee;}
#cbregProduct_1:active {background-color: #EDA37B;}

But I cannot switch color when a specific plan is selected. I tried with attribute "link" and "visited" but of course without success. Registration process is very important and I would like provide the best user experience with both desktop, tablet and mobile device. Actually my solution work with my Android phone and tablet but not on desktop (tested with FF and Chrome).

Have you a workaround for this please ? I suppose with Jquery and Auto-Action with trigger onBeforeRegisterFormDisplay is possible to do something who will work cross all browser/device.

I use Joomla 3.3.6 - CB 2.0.4 - CBSubs 4 - Several Incubator plugins
Last edit: 10 years 6 months ago by dotcom22.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48478
  • Thanks: 8282
  • Karma: 1443
10 years 6 months ago #244299 by krileon

The last thing I would like implement is to be able to customize backgroud color when a plan is select but keep the default color when un-selected. I was able to change color OnMouseHover and OnMouseClick with pure css like this:

CBSubs adds the cbregPlanSelected class to the surrounding DIV when a plan is selected. You can use this to style plans that have been selected. Example asfollows.

Code:
#cbregProduct_1.cbregPlanSelected { background-color: #eeeeee; }


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: dotcom22

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

Moderators: beatnantkrileon
Powered by Kunena Forum