Can I use visibility rules with user group?

  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2727
  • Karma: 93
  • Thank you received: 369

mihaela replied the topic: Can I use visibility rules with user group?

Hello,

I'm glad that this is now working as it should and that the problem is resolved.

Best regards,

Mihaela
#233593
  • 5uwebsite
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 125
  • Thank you received: 2

5uwebsite replied the topic: Can I use visibility rules with user group?

Hi Mihaela,

I may have a small problem here:

When I am editing (i.e. after the record was created, I use the CB view to edit it) the record at the frontend, by default it was not selecting the option that was stored in the database:

This message contains confidential information


and the validation check seems won't stop me to go to the next page.

Therefore, another value, depends on the option/value I picked at this element will not be displayed in the next page.

Is there a fix for it?

You can try to edit any record by going to the frontend at:

This message contains confidential information


And the element depends on that field is on the 3rd page.

Thanks!
#233905
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2727
  • Karma: 93
  • Thank you received: 369

mihaela replied the topic: Can I use visibility rules with user group?

Hello,

I went to look into this to see what had gone wrong, but I get the "Page Not Found" message.

So you are saying that after user fills in the form, when administator goes to edit the form, the fields filled in by user are not visible.

When editing, ContentBuilder should keep the group id from the user that previously submitted the form. Therefore, the corresponding field, for example "Used_or_Leased" should be shown.

Regards,

Mihaela
#233970
  • 5uwebsite
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 125
  • Thank you received: 2

5uwebsite replied the topic: Can I use visibility rules with user group?

Hi Mihaela,

Thank you for your reply! Sorry the editing URL was provided a few days ago and it was updated. The new frontend editing URL is at:

This message contains confidential information


and you can edit this record for testing purposes:

This message contains confidential information


The account login information provided to you was the author's account.

Maybe this issue isn't that complicate. I will try my best to describe the issue as concisely as possible.

There are two form elements on Page 1: A1 and A2.
A1 will be shown for group user id 1, and A2 will be shown for group user id 2. This works very well.

Both A1 has options of a, b and A2 has options of a, b, c, d.

There are another few form elements on page 3, B1s and B2s.
B1 will be shown if option A1-a or A2-a was selected, and B2 will be shown if option A1-b or A2-b was selected. B1s and B2s will NOT be shown if none of the value is selected, due to the setting of visibility rules.

And this is where the issue from: when editing a record (by the author herself/himself), the value of A1 or A2 had been provided (which was the value picked when this record was created). This is why the author won't need to select an option for A1 or A2 anymore. And she/he can go to the next page without making any changes on A1 or A2.

Therefore, it didn't trigger the visibility rule for B1s and B2s. That is why nothing is shown on page 3 now.

After many times testing, as long as we select any value for A1 or A2, the B1s and B2s will be displayed normally on page 3.

I hope this helps. Thanks a lot!
#234014
  • mihaela
  • Away
  • Administrator
  • Administrator
  • Posts: 2727
  • Karma: 93
  • Thank you received: 369

mihaela replied the topic: Can I use visibility rules with user group?

Hello again,

Thank you for the detailed explanation.

I think I know how this issue can be resolved. I assume the problem is that show/hide is triggered on change in A1 or A2 field. Therefore, since there is no change the B1s and B2s fields remain hidden even though they should be displayed based on what was selected in A1 or A2 field while the original form was submitted.

Can you please tell me where did you put the code to show or hide B1s and B2s? Did you write them in "Visibility rules" textarea or the code for this is in some other script? That might be the key to make this work properly in this case.

Also, you wrote "A1 will be shown for group user id 1, and A2 will be shown for group user id 2. This works very well." . Where did you put the code to show or hide A1 and A2 since this is working properly?

Regards,

Mihaela
#234051
  • 5uwebsite
  • Topic Author
  • Offline
  • Expert Boarder
  • Expert Boarder
  • Posts: 125
  • Thank you received: 2

5uwebsite replied the topic: Can I use visibility rules with user group?

Hi Mihaela,

Thank you very much for your reply! Yes I totally agree with you! We are missing the triggering action (i.e. picking an option from the radio list) and that is the reason.

For your questions, we use the visibility rules for showing or hiding B1s and B2s. And they are setup here:

This message contains confidential information


and the code responsible for showing A1 or A2 field was placed in the "Form pieces" tab, under the "Before Form" section:

This message contains confidential information


Thanks a lot for the reply!
#234061
Moderators: ForumSupporttomeperica
Time to create page: 0.074 seconds

New Icon Packs Category!

Crosstec is now offering icon packs.

If you are a paying subscriber, icon packs are automatically added to your account.

Check out our icon packs page!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Summer Sale!

50% discount on all of our extension subscription plans, templates and icon packs!

Get Your Subscription Here

News and Updates

Get informed about new downloads, updates and more in our News and Updates newsletter.

All Extensions Subscription

Get 1 year access to all of our current and future products and 1 year of professional support -- 99 for just 49! (Summer Sale)

No support per domain or website installation limits! Includes all of our current and future Joomla!® extensions, Joomla!® templates for the duration of your membership. This means, by purchasing an All Extensions Subscription you'll have it all covered!

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!

Live Support Chat Opened!

Join our Discord chat here to receive live support and talk directly to the team!

Community Reward

Help us to create new extensions and plugins! With only $5 you help us a lot and get unlimited download access to all of our products, professional support and even more. Get your reward now!

Read More Here