1. REGISTRATION REQUIREMENTS:

    Your username here MUST MATCH your XenForo username (connected to your XF license).

    Once you have registered here, then you need to start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Implemented More detailed Error Message for Value Match Requirements (Item Fields & Review Fields)

Discussion in 'Showcase Closed Suggestions' started by Hentai, Apr 2, 2015.

  1. Hentai

    Hentai New Member Showcase

    I have a lot of fields that require specific syntax.

    I would love to be able to give my users a clue about what they are doing wrong beyond the very generic (and not really descriptive) "Please enter a value that matches the required format" error that pops up.

    Its a usability issue that pops up quite often with users unfamiliar with the Showcase with them not sure where exactly they went wrong. So either custom error messages, or one telling them the errored field might be really helpful.
     
    Dadparvar, 0ptima and alfa1 like this.
  2. Bob

    Bob Developer Staff Member

    You are asking about the Value Match Requirements correct?

    Selection_010.png
     
  3. Hentai

    Hentai New Member Showcase

    Correct. Sometimes people try to enter words into a number field. Soemtimes people enter invalid URLs.

    I would like to tell my users which fields they have in the wrong format.
     
    Last edited: Apr 5, 2015
  4. Bob

    Bob Developer Staff Member

    Did a bit of R&D on this and I think its going to be possible with some code modification. The code modification is not 'minor', so I want to do a little more R&D on it before I commit to it.
     
    alfa1 and Hentai like this.
  5. Hentai

    Hentai New Member Showcase

    It doesn't have to be completely custom, just better indicators on what fields my users are getting wrong would be better than the current generic "Please enter a value that matches the required format".

    My own Showcase has 4 tabs of information, with each tab having multiple value matched fields, so it is not immediately obvious to my users where the error comes from. I appreciate you putting the R&D time at least.
     
  6. alfa1

    alfa1 Active Member AMS Premium CAS Premium EMS Early Adopter IMS Premium LD Premium RMS Premium SC Premium UBS Premium

    This would be really useful to have. People generally don't understand undefined errors and give up on it.

    Maybe its an idea to also highlight the field in red and add a red information text above the field.
     
    Hentai likes this.
  7. 0ptima

    0ptima Member Showcase

    My showcase has lots of custom fields with regex and I just had a member who could simply not create a new item as he did no know what was wrong. He ended up taking pictures of his screen with a camera to show me what he was entering.

    This is must, even if some sort of basic indicator of which field is incorrect would be really helpful.
     
    alfa1 likes this.
  8. 0ptima

    0ptima Member Showcase

    I made a change to the Showcase code to display the description of the custom field when the regex fails

    Here is an example with a custom field that only accepts numeric values.
    upload_2015-10-23_22-43-22.png


    When the regex fails, the description will be shown in the error message
    upload_2015-10-23_22-45-0.png

    To make this change, open CustomField.php located in the NFLJ/Showcase/Model folder

    Go to the verifyCustomFieldValue() method and comment out

    Code:
    //   $error = new XenForo_Phrase('please_enter_value_that_matches_required_format');
    and replace it with
    Code:
    $error =  new XenForo_Phrase("sc_custom_field_" .  $field['field_id']."_desc");
    upload_2015-10-23_22-47-48.png
     
  9. alfa1

    alfa1 Active Member AMS Premium CAS Premium EMS Early Adopter IMS Premium LD Premium RMS Premium SC Premium UBS Premium

  10. Dadparvar

    Dadparvar Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Hi,

    While creating or editing an item, users should fill field as we set criteria in "Value Match Requirements".
    Now, imagine there are more than 30 fields to fill for an item, and all of them have their own criteria.
    If a user write something else in some fields, he/she just will see this error when trying to submit the item:
    err.png
    But, which field has error? user should start checking all fields to see which one has problem.
    I have Two suggestions for this:
    • below the error, it writes list of the fields that should be edited. OR
    • the field with error become red. or show a red error below it.
    For first suggestion, I can refer to Advanced Application Forms add-on that worked perfect. We can write even what error to show when a user write wrong content in a field (for each field). See:
    errrrr.png
    And for second suggestion I refer to xenforo itself:
    er.png

    Regards
     
  11. Bob

    Bob Developer Staff Member

    I've made a minor modification to the error message that should help most cases. It is also up to you as administrators when creating Item Fields and or Review Fields, to provided a detailed description if you are forcing value match requirements eg, if you are wanting them to enter a URL, then tell them the required format in the description.

    NOTE: This works with both custom ITEM Fields and custom REVIEW Fields (they share the same 2 phrases)

    If they enter the wrong format, there are 2 possible error messages. One for fields that have a description (first image) and one for fields that do not have a description (2nd image).

    Phrase: nflj_sc_custom_field_error_name_description

    Selection_347.png


    Phrase: nflj_sc_custom_field_error_name

    Selection_348.png
     
    Last edited: Dec 7, 2015
    alfa1, Hentai, 0ptima and 2 others like this.
  12. Dadparvar

    Dadparvar Member AMS Premium CAS Premium RMS Premium SC Premium UBS Premium

    Like Always, Awesome!
    Thanks Bob
     
  13. 0ptima

    0ptima Member Showcase

    The formatting is off when multiple errors are displayed
    upload_2015-12-21_21-39-57.png


    For regex failures, I suggest that the "Required Format:regex" not be shown as most users wont know what a regex is.
    Site owners should provide the type of input the user should be entering in the custom field description.

    upload_2015-12-21_21-46-19.png
     
    alfa1 likes this.
  14. Bob

    Bob Developer Staff Member

    on both those REGEX fields, you DO NOT have a description that even remotes serves the purpose of a description. The description for fields ONLY displays on the INPUT FORM, so you can get very detailed about what you need users to enter. 1/4 Mile MPH as a description doesn't tell them the exact format. Having an example of the required format IN the description is what the entire purpose of the description is for. The description does NOT display on the ITEM page itself.
     
  15. 0ptima

    0ptima Member Showcase

    Let me clarify what I meant.
    WHP, 60 ft ET and 1/4 Mile MPH are all regex fields and I have updated the description to reflect the expected format to show the user a relevant error message.
    What is not intuitive for the user in the error message is the "Required Format:regex" as most users wont know what a regex is.

    upload_2015-12-22_12-24-26.png

    When a regex fails, I would not want the "Required Format:regex" be shown. Here is what I would like to see.

    upload_2015-12-22_12-20-59.png
     
  16. Bob

    Bob Developer Staff Member

    no thank you. Something like that you can do on your own.
     
  17. 0ptima

    0ptima Member Showcase

    What about the spacing? Is that as designed?
    The item name error (Please enter a valid item name) should be the first error to be displayed.

    upload_2015-12-22_23-40-29.png
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.