What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How to display the currently selected month as a string?Asked by Avertical on August 27, 2015 at 08:45 AM
I am trying to get my form to have a field to display only the current month that will automatically update based on current date prepopulated from the date field. Isn't the purpose of the date() function to transform a string into a longford date? This is what the example text shows. Below is the form that I'm working on.
date field thank shows
I took a look at your form Alfredo, but I see that you were able to set it up so that only the month is shown, using the Substring widget.
I am not quite sure what you mean by date() function not working correctly, but the date() function should actually return a date element that you can use based on the string that you provide in the form calculation or the conditions.
To get the month, you can use:
1. the option you have used above - Substring widget
2. conditions to check which month it is and based on that to fill the field on the form with the right data.
The conditions however require you to check if the date is between static dates which means that you would need to manually add the checks if date is before or after year-month-day.