Conditional fields and values

18 years 4 months ago #1333 by mikko
Conditional fields and values was created by mikko
There should be an option for fields and field values to be conditional, i.e. only display when a condition is met.

An example:

The site registers country and state. Initially The user sees a select list with available countries. When the user
selects a country, another select with the available states appears.

Created a feature request for this: developer.joomla.org/sf/go/artf2444?nav=1

mikko

Please Log in to join the conversation.

18 years 4 months ago #1391 by elesus
Replied by elesus on topic Re:Conditional fields and values
REALLY valuable thing.

My example:

The user picks if he/she is a student or teacher. Then the next drop down appears allowing to choose among grades (if student) or among departments (if teacher).

СB3РD

Please Log in to join the conversation.

18 years 4 months ago #1408 by groenewaldd
Replied by groenewaldd on topic Re:Conditional fields and values
Mine would be:

User selects 'Gender' as female: asks for Maiden name.

Would be really useful.

Please Log in to join the conversation.

18 years 4 months ago #1410 by pointri
Replied by pointri on topic Re:Conditional fields and values
That would be fantastic. A plugin making use of an AJAX class toggling fields as visible would be phenominal.

On the same lines, a way to set up calculated fields from the administrative screens would be great as well, picking up the value of one or several user fields to fill in another using php and/or Javascript.

One practical application that comes off the top of my head is to calculate a user's age from a birthdate selected using a calendar field.

Would it even be feasible to extend the field types as plugins?

Joomlapolitan zealot and a somewhat stealthy, rather passive CB3PD developer.
www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.

Please Log in to join the conversation.

18 years 4 months ago #1432 by elesus
Replied by elesus on topic Re:Conditional fields and values
You can implement Calculated fields with the help of plugins: user enters his birthday, submits the information and plugin using "onAfterRegistration" event calculates his age and adds it to the database.

However it is not possible to implement dependent fields in this manner... :(

СB3РD

Please Log in to join the conversation.

18 years 4 months ago #1437 by mikko
Replied by mikko on topic Re:Conditional fields and values
I am pretty sure that one could implement this function by writing a plugin that only inserts some javascript in the UI. This would be quite clumsy though.

mikko

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.226 seconds

Facebook Twitter LinkedIn