Is there a way to grab just the month and year as a token in forms? It only gives me option for a date that includes the actual DAY. I know there's a way to do it in Workflow, but I'd prefer to do it right in the forms business process, if possible.
Question
Question
Replies
replied on November 10, 2020
If you just want a text string in a regular text field with the year and date you can do it in JavaScript:
$(document).ready(function() { const date = new Date(); const stringDate = date.getFullYear() + '-' + ( date.getMonth() + 1 ) $('Your selector here').val(stringDate); })
Unfortunately you can't do this in a date selector field. It requires a full date.
1
0
replied on November 9, 2020
Forms currently only supports the original token values, no out of box formatting or processing for token values is supported.
0
0
replied on November 12, 2020
You can also create a Field and use the formula =YEAR(date variable) for the Year, =MONTH (date Variable) for the month or =DAY(date variable) for the DAY.
You can also use =YEAR(TODAY()) for today's year etc
0
0
You are not allowed to follow up in this post.