No Code Attached Yet
avatar keep
keep
24 Nov 2023

Steps to reproduce the issue

  • Add a new custom field with the type 'integer'
  • Do not mark it as required.
  • Create an article and check the new field instance

Actual result

The field generates a dropdown from 1 to 100 or as per the values set for first/last/step. Although it is not required, the form submits with the first option of the dropdown. Essentially, there is no difference whether it is marked as required or not.

The list-type fields produces a similar behavior.

Expected result

I'm uncertain about the appropriate solution:
Should there be an empty option as the first choice? Or perhaps an option to somehow remove/disable/not use the custom field for the current article? While, with a list-type field, I can manually add an empty option, it doesn't seem like an elegant solution.
Moreover, I don't actually need the field's value when I haven't marked it as required, even if it's empty. Perhaps it would be beneficial not to add the record to #__fields_values as well.

System information (as much as possible)

Joomla 5.0.0
PHP 8.2.12
MariaDB 10.6.15

Additional comments

avatar keep keep - open - 24 Nov 2023
avatar keep keep - change - 24 Nov 2023
Labels Removed: ?
avatar joomla-cms-bot joomla-cms-bot - change - 24 Nov 2023
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 24 Nov 2023
avatar Quy
Quy - comment - 24 Nov 2023

Duplicate #27877

avatar Quy
Quy - comment - 27 Nov 2023

Closing as duplicate. Thanks for the report.

avatar Quy Quy - close - 27 Nov 2023
avatar Quy Quy - change - 27 Nov 2023
Status New Closed
Closed_Date 0000-00-00 00:00:00 2023-11-27 10:57:42
Closed_By Quy

Add a Comment

Login with GitHub to post a comment