Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 02:11 AM
Hi Team,
I have a requirement like onsubmit of the form, i need to display the month and year of the date field: Post date on the form as a info message using OnSubmit Client script. How to achieve this?
Any suggestions will help.
Thanks
Solved! Go to Solution.
1 ACCEPTED SOLUTION

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 02:19 AM
How about simply getting value from the field and running substring function on that? 🙂
var date = g_form.getValue('post_date');
var year = date.substring(0,4);
var month = date.substring(5,7);
g_form.addInfoMessage('Year: ' + year + ' / Month: ' + month);
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2022 02:19 AM