Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-9084

Unable to display 'option equal to non entered value' if dropdown CPF is not required

    Details

    • Type: Bug
    • Status: Unverified Fix
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.6
    • Fix Version/s: 3.0.11-RC1
    • Component/s: ACP
    • Labels:
      None
    • Environment:
      PHP Environment: 5.2.5
      Database: 5.0.45

      Description

      Hi everybody,

      On the custom profle fileds, in page 2 "profile type specific options", if you choose an "option equal to non entered value" and if the field is NOT required, the value choosen is not display (on the viewtopic screen and the profile).
      So I understand when the field IS required that an error is displayed, but if the field is NOT required, normally the field must be display.

      To correct this I did this:
      open includes/functions_profile_fields.php
      find:

      if ($value == $ident_ary['data']['field_novalue'])

      replace with:

      if ($value == $ident_ary['data']['field_novalue'] && $ident_ary['data']['field_required'])

      I hope this is correct and can help.

        Issue Links

          Activity

          Hide
          nickvergessen Joas Schilling added a comment -

          Chris, can you have a look at this?

          Show
          nickvergessen Joas Schilling added a comment - Chris, can you have a look at this?
          Hide
          rxu Ruslan Uzdenov added a comment - - edited

          This is about 'Dropdown box' CPF type.
          If you make a set of options, including, for example, 'Select option' as an "option equal to non entered value", and user tries to save profile with that, there're 2 cases currently:
          1. The field is required. User is getting red error message: "The field “Fieldname” must be completed."
          2. The field is not required. User is able to save profile settings when selecting an option equal to non entered value.
          Then, in viewtopic, function get_profile_value() returns NULL for such profile field, regardless of if it's 'required' CPF.

          Show
          rxu Ruslan Uzdenov added a comment - - edited This is about 'Dropdown box' CPF type. If you make a set of options, including, for example, 'Select option' as an "option equal to non entered value", and user tries to save profile with that, there're 2 cases currently: 1. The field is required. User is getting red error message: "The field “Fieldname” must be completed." 2. The field is not required. User is able to save profile settings when selecting an option equal to non entered value. Then, in viewtopic, function get_profile_value() returns NULL for such profile field, regardless of if it's 'required' CPF.

            People

            • Assignee:
              rxu Ruslan Uzdenov
              Reporter:
              lolovoisin lolovoisin [X] (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development