Navigation überspringen

[Gelöst] Date field starting value

This support ticket is created vor 5 Jahren, 5 Monaten. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 3 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Luo Yang vor 5 Jahren, 5 Monaten.

Assistiert von: Luo Yang.

Author
Artikel
#1321623

Pat

Hello,

I'm using a date field in a user form and have an issue.

The way the field is working (ie : chose the year, then the month and finally the day is not always understood by users.

Sometimes, they are not defining the year and in the end, we get a wrong info.

Is there a way to have a better front end management for this kind of field :
- pre-position the initial value to undefined in order to force the user to enter all info
- instead of using the calendar view, have 3 different fields for year, month and day

Let me know
Regards
Pat

#1321779

Dear Pat,

I assume we are talking about the datepicker outputted from shortcode [cred_field].
See our document:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

As you see, there are't both built-in features within Toolset Forms plugin.

You can add a feature request for it, our developers will evaluate it:
https://toolset.com/forums/topic/feature-request-add-new-post-option-when-creating-a-relationship-in-toolset-forms/

#1321785

Pat

Hi Luo,

If I look at the Types API, I can see that it is possible to have a style option (calendar, text). This is a pity we cannot use it inside Cred.
Another point is that in Cred, we can define a Value parameter. Would it be possible to place something there in order to get an undefined date from the beginning (ie : oblige the user to chose a complete date in the calendar then after ?).

Regards
Pat

#1321801

I have already tried it in my localhost, the attribute "value" can only setup the default value of input box, it can not do what you want:
place something there in order to get an undefined date from the beginning

And according to the document I mentioned above:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field
date fields require a valid timestamp instead of a date string.