Conditional fields and values

13 years 11 months ago #1333 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
13 years 11 months ago #1391 by elesus
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
13 years 11 months ago #1408 by groenewaldd
Mine would be:

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

Would be really useful.
13 years 11 months ago #1410 by pointri
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.
http://www.constructionlounge.com Construction Lounge: Online resource and networking portal for the construction and remodeling industries.
13 years 11 months ago #1432 by elesus
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
13 years 11 months ago #1437 by mikko
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
Moderators: beatnantkrileon
Time to create page: 0.435 seconds
Facebook Twitter Google LinkedIn