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?
Copy link to clipboard
Copied
@Rex390265741pal there are a few ways, but:
1. All Tools - Prepare a Form - Create A Form
2. Click on Edit - Text
3. In the tool bar, click on the text tool to enter text
4.
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.
Copy link to clipboard
Copied
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?
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.
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.
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;
}
}
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.
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!
Copy link to clipboard
Copied
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.