User profile fields: Conditional field

profilefield_conditional
Maintained by Picture of Shamim RezaieShamim Rezaie
A drop-down menu field that shows/hides some other custom profile fields depending on its selected value.
381 sites
212 downloads
32 fans
Current versions available: 1

The conditional profile field plugin is an advanced version of the dropdown menu profile field type in which you can decide to hide/show some other profile fields based on the value selected for this field.

This allows you designing dynamic signup/profile pages.

You can also set some other fields to be required based on the selected value for this field.

If this plugin makes your life easier, you can treat me a coffee smile

Buy Me a Coffee at ko-fi.com

Screenshots

Screenshot #0
Screenshot #1
Screenshot #2
Screenshot #3
Screenshot #4
Screenshot #5

Contributors

Picture of Shamim Rezaie
Shamim Rezaie (Lead maintainer)
Please login to view contributors details and/or to contact them

Comments RSS

Comments

  • Picture of László Pauer
    Thu, May 11, 2017, 9:19 PM
    For example, these are all custom profile fields, all displayed on the registration page:

  • Picture of Shamim Rezaie
    Mon, May 15, 2017, 8:58 AM
    Hi László Pauer,
    Please file an issue at https://github.com/rezaies/moodle-profilefield_conditional/issues and provide as much details as possible so I can replicate your issue.
    Please mention your Moodle version as well.
  • Picture of Nicolás Gómez
    Sat, Jul 29, 2017, 7:42 AM
    Hello, I guess it's a very good plugin, although I have a trouble. When I select the "Conditional Field" it redirects me to: "/user/profile/index.php?id=0&action=editfield&datatype=conditional"; and shows this error mesage:

    "
    Esta página no funciona

    La página no puede procesar esta solicitud ahora.
    HTTP ERROR 500
    "

    I tried with a checkbox and the redirection is almost the same: /user/profile/index.php?id=0&action=editfield&datatype=checkbox".

    Moodle Version 3.1
    Language: Spanish

    Thanks in advance.
  • Picture of Shamim Rezaie
    Sun, Jul 30, 2017, 3:53 AM
    Hi Nicolás,
    Please turn on debugging mode in 'Site Administration > Development > Debugging'.
    Set 'Debug messages' to 'DEVELOPER: extra Moodle debug messages for developers' and select the 'Display debug messages' checkbox. Then please try again to add a conditional field. You would see an error message with some useful information about the error.
    Please file an issue at https://github.com/rezaies/moodle-profilefield_conditional/issues and post debugging information there.
  • Picture of Nicolás Gómez
    Sat, Sep 9, 2017, 5:03 AM
    Hi Shamim,

    Thank you for your answer.

    I made it and the error message says: Fatal error: Can't use function return value in write context in /path/to/my/installation/user/profile/field/conditional/define.class.php on line 126.

    Thanks again.
  • Picture of Shamim Rezaie
    Sat, Sep 9, 2017, 8:14 PM
    Hi Nicolás,
    Please report this at https://github.com/rezaies/moodle-profilefield_conditional/issues
    Also please confirm if you can add other profile field types (like checkbox) without any problem.
  • Picture of Tanja Messerschmidt
    Tue, Jun 26, 2018, 4:09 AM
    Hi Shamim,
    I am looking forward to seeing your plugin available for moodle 3.5.
    Thanks in advance.
  • Picture of Kashyap Kr
    Tue, Mar 5, 2019, 8:58 PM
    Hi, lil help. How to add these custom fields to o365 User Field Mapping (Active Directory Field)?
  • Picture of Alicia Yoshida
    Thu, Mar 21, 2019, 9:01 PM
    Hi. I'm having some problems with this plugin. I use LDAP authentication on my Moodle site and it doesn't work. Could anyone help me, please?
  • Picture of pierre REMY
    Thu, Jun 6, 2019, 4:20 PM
    hi,
    does this plugins offer the feature to show/hide custom fields (or custom category of fields) by role (or by user) ?
    imagine i need to not show/hide extra-field (of user profil) depending of the current user role.

    Example :
    the teachers don't have to see/access to the socials fields
    the medical team don't need to access to accounting fields but need to have his "own" fields (like health problem, vaccine,..)
    the foad team don't need to access to social fields nor accounting ones neither medical fields !

    does this plugin fill my need ?
  • Picture of Olli Savolainen
    Wed, Jun 19, 2019, 4:22 PM
    If there are a lot of profile fields, you'll need to replace
    [div class="no-overflow"]

    with this:
    [div class="" style="overflow-x:scroll"]

    in templates/condition_configuration_page.mustache

    (replace braces with angle braces above)
  • Picture of Kashmira Nagwekar
    Thu, Jan 2, 2020, 2:25 PM
    Hi, I have installed this plugin on Moodle version 3.5 and I am getting empty space on registration form where I am setting up conditional field, the dependent fields for which are initially supposed to be hidden and appear after user selects a particular option in the conditional field.
    The scenario is: the user is supposed to select a 'country', depending upon which 'states' belonging to that country should appear (which is again a conditional field with 37 options), and depending upon the state selected, the district dropdown (37 normal dropdown fields) should appear.
    The issue is: in the registration form there appears considerable amount of empty space after country dropdown, though the conditions are working properly.
    Any suggestions to get rid of the empty space?? (I tried the solution suggested by Olli Savolainen but the space still remains.)

    Thanks & Regards,
    Kashmira
  • Picture of Gary Magee
    Wed, Mar 4, 2020, 11:21 PM
    Hi, did you ever find a solution to the white space problem when having multiple fields? I tried the above but did not work.
  • Picture of Maria Lumbreras
    Mon, Mar 16, 2020, 7:21 PM
    It works perfectly in Moodle 3.8.1. Tested.
  • Picture of andrea b
    Tue, May 12, 2020, 12:56 AM
    Hi, I am using this plugin on moodle 3.8. All seems to work. The problem is regarding the option Hide Initially, I can't make it work. How can understand where is the problem?
    Thank you
Please login to post comments