Skip to Content Skip to Menu

🌟 CB Editor Assistant 1.0.0 is here! Discover our new AI Joomla Plugin that wrote its story! (and this banner!)
Start at just $12.50/month* or 💸 save 30% with our 🛍️ Intro Black Friday Offer for a lifetime*

I need help with conditional fields please

  • GUEST
18 years 6 months ago #11263 by
Hi B)
I have downloaded and installed the plugin and read the previous topic about it but I can't get it to work !
I guess that the fact that the explaination is in english may be one cause :p but some things are not clear to me.

Here is what I do:

I have created a new field dropdown with two values : 1 and 2
(I want that when "1" is selected a new field appear)
name:cb_testing
Required?: yes
Show on Profile?: yes
User Read Only?: no
Show at Registration?: yes
Published: yes in the tab "conditions"


then I have created a new field in jos_comprofiler_conditions
fieldname : cb_testing
value : 1
id (auto) 0

Then I have created a new field called
cb_test ,
a dropdown combo with two values : A and B
Required?: yes
Show on Profile?: yes
User Read Only?: No
Show at Registration?: yes
Published yes in tab "conditions"


Then In database: table : jos_comprofiler_fields
I have located cb_test and in the field conditionid I have put 0 (wich is the id of cb_testing, the field that holds the condition.

The problem is that both fields are visible in the registration form and too I must say that I didn't really understood wich fields must be in the condition tab or not.

in the backend, cb_testing is BEFORE cb_test (in the order).

Can you help me with this please ?

It sounds like I have the same problem that other people that has posted before, but I didn't get the point on how they've solved it.

Thanks,

Houbahop.

:pinch:

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

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
18 years 6 months ago #11271 by mikko
The current version does not work on registration form.

The plugin works so that it loads some javascript that is executed when the page loads. This is done in the header of the conditions tab. For this reason, the conditions apply only to fields that were loaded before the javascript. This means that the conditions apply only tabs that are _before_ the conditions tab.

Both of these limitations will be lifted in the next release of the plugin.

mikko

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

  • houbahop
  • houbahop
  • OFFLINE
  • Posts: 50
  • Thanks: 0
  • Karma: 9
18 years 6 months ago #11272 by houbahop
Replied by houbahop on topic Re:I need help with conditional fields please
Thanks, but I still don't understand all.

So, if this doesn't work on registration form,
where can it be used ?

I have created a new tab named test and in the list of tabs in the backend, it is BEFORE the condition tab in the order.

then I have changed my two conditionnal fields in this new tab.

What must I do now ?

Sorry to be noobish but I really don't see what it is usefull for if not the registration form.

:blush: :silly:

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

  • mikko
  • mikko
  • OFFLINE
  • Posts: 703
  • Thanks: 0
  • Karma: 115
18 years 6 months ago #11294 by mikko
You can use it when the user edits their profile. In the site that I have, only 20% of data is collected at registration and rest after this. The conditions was not needed for this 20%, so I did not make the initial veersion to work with registration.

When I have the time (and when 1.0 stable is out) I will upgrade the plugin to work with registration as well.

Can you post here the content of your conditions table and the rows from the fields table where you assigned these conditions to.

mikko

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

  • houbahop
  • houbahop
  • OFFLINE
  • Posts: 50
  • Thanks: 0
  • Karma: 9
18 years 6 months ago #11305 by houbahop
Replied by houbahop on topic Re:I need help with conditional fields please
Thank you,
I understand now :)

Just a few questions/ideas for future releases

- is it possible to hide the condition tab when the user is updating ? (I know it will be hidden with new cb release ;) )

- If it's possible to have a condition to show a field, I think you should add a condition to hide one.

Example :
I have a comboboix named "continent" filled with
America
Africa
Asia
Europe
Oceania

If the user choose Europe a new combobox is visible with countries :
France
Great Britain
Italia

If he has choosen Africa there is a list with some african countries instead.

if the user has choosen Europe->France there is a list of
french departments.

lets say that the user has choosen one and saved


Now he want to make some modifications to these settings

the user choose Africa instead of Europe so, the combo with the african counties shows up.

But the french department list is still visible !
So maybe this will be usefull to have that if the user choose one item in a field, it shows up a new element and hide a list of other elements.
However this will not solve the problem that the previously filled field that is now hidden will remain filled in database... wich may be not be a real problem if further search sql queries are well builded (for example show all users of a defined country that must check if the user comes from the required continent first)



- Too, I must set the field to non required because with several sub levels like this, it's impossible to save settings if all fields are required.

However, this works fine, thanks









:laugh:

Post edited by: houbahop, at: 2006/04/30 14:19

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

Moderators: beatnantkrileon
Powered by Kunena Forum