Arrow Home arrow Forums
larger font smaller font default font Fixed screen resolution Auto adjust screen size

Joomlapolis Forums  


<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>
Re:Conditional fields and values
Date: 2005/12/06 20:24 By: elesus Status: User  
Karma: 4  
Junior Joomlapolitan

Posts: 39
graphgraph
I think it is possible for the custom Tab... but I doubt if it is possible to include JS into the registration page...
СB3РD
Click here to see the profile of this user The topic has been locked.

Re:Conditional fields and values
Date: 2005/12/09 18:43 By: beat Status: Admin  
Karma: 256  
Admin

Posts: 4215
graphgraph
elesus wrote:
I think it is possible for the custom Tab... but I doubt if it is possible to include JS into the registration page...

Yes it is possible. Read carefully the API documentation .
Beat - Developer on Community Builder core Team
- If you like CB and this forum, you will love Nick's CB 1.2 RC4 reference manual ! : Click here to Get it now
- Would like to help us move faster ? Get it, and/or help us spend more time coding by helping others in this forum, many thanks
Click here to see the profile of this user The topic has been locked.

Re:Conditional fields and values
Date: 2005/12/09 19:19 By: elesus Status: User  
Karma: 4  
Junior Joomlapolitan

Posts: 39
graphgraph
So, do you mean that it is possible to implement conditional fields on the registration page using plugin with JS?
СB3РD
Click here to see the profile of this user The topic has been locked.

Re:Conditional fields and values
Date: 2005/12/09 20:05 By: mikko Status: User  
Karma: 106  
Platinum Joomlapolitan

Posts: 2230
graphgraph
Do you suggest that this feature should be implemented as custom tab, or should it be postponed until the fields have been included in the plugin api?

We are in need of this feature in a month or two and will code it ourselves one way or another.

mikko
Click here to see the profile of this user The topic has been locked.

Re:Conditional fields and values
Date: 2005/12/09 23:05 By: beat Status: Admin  
Karma: 256  
Admin

Posts: 4215
graphgraph
elesus wrote:
So, do you mean that it is possible to implement conditional fields on the registration page using plugin with JS?

@ elesus:
Didn't say that like this...
Just said that it is also possible to cleanly insert JS into the registration page... and to do whatever is needed for your plugin own dhtml handling.


mikko wrote:
Do you suggest that this feature should be implemented as custom tab, or should it be postponed until the fields have been included in the plugin api?

We are in need of this feature in a month or two and will code it ourselves one way or another.

mikko


@ Mikko,

Well, fields handling moving to plugins was planed, but didn't make it into RC2. I'm not expecting it to happen within the next 2 months on my free time, except if there is a business case for this and the other nice stuff expressed in this thread, as other stuff has higher priority on my short-term sparse free time.
Beat - Developer on Community Builder core Team
- If you like CB and this forum, you will love Nick's CB 1.2 RC4 reference manual ! : Click here to Get it now
- Would like to help us move faster ? Get it, and/or help us spend more time coding by helping others in this forum, many thanks
Click here to see the profile of this user The topic has been locked.

Re:Conditional fields and values
Date: 2005/12/10 00:05 By: mikko Status: User  
Karma: 106  
Platinum Joomlapolitan

Posts: 2230
graphgraph
Here is a draft plan for making a plugin to implement the functionality. This is definitely not an end user solution, but something to start with.

Add table conditions with columns id, field, value. When a given field has a given value, the condition is considered active.

Add column confition id to fields and field values. This indicates which condition must be true for field or column to show.

The plugin would insert javascript that would.

1) Initially evaluate all options and hide all fields and options that do not have a non null condition that evaluates to fals calling document.getElementByName()

2) Implement functions to toggle conditions on/off. This functions would hide or show options and fields

3) Iterate all elements with conditions enabled and insert stuff in the onchange property to to call the toggle functions whne conditions become true.

All the data would be managed directly in the database, so no need to spend time with coding backend.

Making it with this design would be just a few hours.

Any comments on this design?

mikko
Click here to see the profile of this user The topic has been locked.

<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Documentation

Documentation Subscription Service
(updated for CB 1.2 RC4)

What?

Why?

Where?

Just click here for answers!

Click here for a yearly subscription: subscribe now

Download Latest Release

The latest stable Community Builder Release is version 1.1 for Joomla 1.0 and Mambo.
You need to be a registered member of Joomlapolis to download.

The latest release candidate of Community Builder is version 1.2 RC4, native for Joomla 1.0, 1.5 and Mambo.
It is available as "thank you" to all CB documentation subscribers and now also to all registered joomlapolitans.

CB Login