• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to create a date field with the option for free text?

New Here ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

The option box I see everyone referencing, "Allow user to enter custom text" is not present on the format tab or anywhere else that I can see. Is there another way to do this?

TOPICS
PDF forms

Views

236

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

@Rex390265741pal there are a few ways, but:

1. All Tools - Prepare a Form - Create A Form

mpchow_0-1722973416432.png

 

2. Click on Edit - Text 

mpchow_1-1722973500932.png


3. In the tool bar, click on the text tool to enter text

mpchow_2-1722973568159.png


4. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

Definitely appreciate the response. I apologize, I don't think I was clear enough in my question.

I have a date field box created with the option to select a date. I want to keep that option and allow users to enter text as well. In the current date field box, under format and options, there is not an option to allow users to create custom text. 

If I create a drop down box, under options tab there is an option for allow custom text; however, when I select date under format tab, it does not allow custom text due to not being in proper format. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

Rex390265741pal_1-1722975178574.pngRex390265741pal_2-1722975196697.png

 

Rex390265741pal_3-1722975245538.png

Rex390265741pal_4-1722975273444.pngRex390265741pal_5-1722975314243.png

 

 

 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 06, 2024 Aug 06, 2024

Copy link to clipboard

Copied

What is the point of having a Date field if the user can enter whatever they want into it? How is that different from just a plain-text field?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 07, 2024 Aug 07, 2024

Copy link to clipboard

Copied

Aware that it is not different than just having a plain text field, and could just be as easy to have that instead. My point and opinion is that it presents more professional to the user. The field is intended to represent an expiration date timeline, so 95% of the time it will be a date. However, for that other 5%, there is no date to represent "unlimited" or "no expiration". Which is why it would be nice to have the option for free text. 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 07, 2024 Aug 07, 2024

Copy link to clipboard

Copied

You can create a (text) field that only accepts dates in a specific format, or specific strings (such as "unlimited" or "no expiration"), but a date field that accepts input of all kinds is the same as an open-text field.

The former will require creating a custom-made validation script, though.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 07, 2024 Aug 07, 2024

Copy link to clipboard

Copied

Cool, that might actually work good. I picked up the below from another response you had to someone. What would need to change/be added to it to only allow the date in the sepcific format in the script?

 

if (event.value) {
if (util.scand("mmmm d, yyyy", event.value)==null && event.value!="Unlimited") {
app.alert("Invalid value entered.");
event.rc = false;
}
}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 07, 2024 Aug 07, 2024

Copy link to clipboard

Copied

Nothing, that code should do the trick! But be aware this means the user has to enter the date EXACTLY in that format. It won't convert it for them if they entered "8/7/2024", for example. They will have to enter it as "August 7, 2024" for it to be accepted.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 07, 2024 Aug 07, 2024

Copy link to clipboard

Copied

Yeah, that works. I was just wondering if it could be set to give an error if they did enter 8/7/2024, and not August 7/ 2024. It does not give the error as is right now. I really appreciate all the help though!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 07, 2024 Aug 07, 2024

Copy link to clipboard

Copied

LATEST

Actually, it seems the scand method is capable of converting that string into a proper Date object.

So you can use a Format string to change it to your desired pattern, or use a more complex script to reject it.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines