?
avatar coolcat-creations
coolcat-creations
4 Mar 2017

Steps to reproduce the issue

For Calendar i put in the default value today + 1, which is, i thought right for chosing the next day.

image

The article view renders like this:

image

with the Error-Message:
image

If it´s a user failure, what are the possible default values and how to fix the UX there?

avatar coolcat-creations coolcat-creations - open - 4 Mar 2017
avatar joomla-cms-bot joomla-cms-bot - change - 4 Mar 2017
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 4 Mar 2017
avatar Bakual
Bakual - comment - 4 Mar 2017

The default value for that field can only be "NOW" or a valid date. Since the code uses the regular calendar formfield, there is actually even a documentation about it ?
https://docs.joomla.org/Calendar_form_field_type

avatar coolcat-creations
coolcat-creations - comment - 4 Mar 2017

That´s great, then the text from the docs, could be applied to the default tooltip
"This is the default date. This must be given in the same format as specified by the format argument. You can put "NOW" to have current date or time information in the given format."

avatar Bakual
Bakual - comment - 4 Mar 2017

The default value uses a string from com_fields that is the same for each type. While I agree that this would be helpful I don't know if it is possible to replace that string
@laoneo Do you know of a way?

avatar coolcat-creations
coolcat-creations - comment - 5 Mar 2017

For better UX each Tooltip for the fields should be individual and tell the user what to do here.
Label Default and Tooltip "Type in the default" is worth nothing if there are only specific values allowed... Please keep also non-powerusers in mind.

avatar Bakual
Bakual - comment - 5 Mar 2017

Actually I think the calendar one is one of the few ones which allow a default value that is different from a valid value as expected by the field. So a "number" field expects a number as default, the "color" a valid color, ...
I don't think it makes sense to specifiy a custom default value for each field, for most of them it should be clear enough.

avatar coolcat-creations
coolcat-creations - comment - 5 Mar 2017

User expects an id, and can´t be the username for example...

avatar Bakual
Bakual - comment - 5 Mar 2017

There was proposal to have the default option use the formfield itself. So a color field would have a color picker for the default value.
I think it would be nice for some fields, but not for all. Eg for the calendar one it would not allow "NOW" as value, which you currently can enter and which is actually a very usefull default value.

I see the issue but I don't have a good solution here. Maybe let the plugin somehow overwrite the default parameter type but I don't know if that would be possible.

avatar coolcat-creations
coolcat-creations - comment - 5 Mar 2017

For the calendarfield you can have a NOW or a calendar depending on what the user wants to have. First a Dropdown with "NOW" or "Date", if date is selected a calendarfield is shown.

avatar Bakual
Bakual - comment - 5 Mar 2017

I like that idea. Yep, that would work from an UX perspective. Now to find a way to code that ?
I think it means that the default field has to be specified by the plugin instead of hardcoded by com_fields. But maybe there is a better idea. @laoneo any good idea?

avatar laoneo
laoneo - comment - 6 Mar 2017

You can override the default field in the plugin, please check the pr #14368. I'v also changed the default value. The request from @coolcat-creations to have a second field with the datepicker is not possible with the current set up as a new database field must be introduced.

avatar zero-24
zero-24 - comment - 6 Mar 2017

Closing as there is a PR ;) thanks

avatar zero-24 zero-24 - change - 6 Mar 2017
Status New Closed
Closed_Date 0000-00-00 00:00:00 2017-03-06 07:52:12
Closed_By zero-24
avatar zero-24 zero-24 - close - 6 Mar 2017

Add a Comment

Login with GitHub to post a comment