- cgskillaccountsAsked on December 07, 2016 at 10:36 PM
Hi, I'm looking for the right widget which can pick Month & Year. And from there to output to my defined values.
Example Dec 2016 = 1612
(Custom defined value) which of the widget would be able to do it short of me listing all months & year with hidden value inside dropdownlist?)
- JotForm SupportChriistianAnswered on December 08, 2016 at 02:36 AM
Unfortunately, upon looking to our widgets, I'm afraid that there is no widget that can achieve your requirement. However, the only widget where it can pick a date and can show a short date format is the Mini Date Picker.
If you are looking for something else, do let us know.
- irfanmoosaniAnswered on December 08, 2016 at 05:17 AM
I tried to create a work around for the same, but I am not sure how much that would be helpful.
I tried using substring widget to extract the month and year from the date
But the only issue is that the substring widget stays on the form and I could not hide it. I am still posting my workaround, hoping that it might give some direction to reach a proper solution
You can check the form I created at https://form.jotform.me/63421630606448
You can clone the form and can play around. To learn how to clone a form please visit this link
First you need to add the Substring Widget. If you haven't done this before then follow the instructions provided at this link.
Step 1 : Set up form as shown or clone the form I created as explained above
Step 2 : We will be using 2 substring fields, one to store Month and other to store 2 digits of Year
Step 3 : We wrote a condition to copy the date in a single field named "should be hidden". We named it that way because we need to hide these field once the form is ready, unless we want to use it on the form
Step 4 : We found the id of the field from where we will pick the date string. This is required by Substring widget
Step 5 : Then we need to configure the substring widget
Step 6 : Source field is the field id that we have already
Substring start after 0 ie from first character
Substring end is 2 the 2nd letter would be the last to be copied
so if date is 09/17/2016, it will start from 0th characters ie 0 in 09/17/2016 and will stop at 2nd characters ie 09
Step 7 : Similarly we are starting after 8th character and stopping at 10th character ie 16
Step 8 : Now, we will write condition to add the output of 2 substrings and add these to a new field which is names "Displayed Field" in our form
Hope this helps.