Regarding answer format | XM Community
Skip to main content
Solved

Regarding answer format

  • June 8, 2018
  • 4 replies
  • 46 views

Forum|alt.badge.img
Hi community, I would like to ask if there's any way to set up answer on the survey in the format of *time*. I believe there's a code or javascript. This is my ideal way to reflect the answer on the survey. !

Best answer by TomG

Check the https://flatpickr.js.org/getting-started/flatpickr getting started page. Add the CSS and JavaScript to your survey header under Look&Feel. Attach to the text input in your question using jQuery.

4 replies

PeeyushBansal
Level 6 ●●●●●●
Forum|alt.badge.img+43
  • Level 6 ●●●●●●
  • 1171 replies
  • June 8, 2018
You can use below code in HTML of question text:- <!DOCTYPE html> <html> <body> <h2>Time Field</h2> <form action="/action_page.php"> Select a time: <input type="time" name="usr_time"> </form> </body> </html>

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • June 10, 2018
You can integrate flatpickr.

Forum|alt.badge.img
  • Author
  • 6 replies
  • June 10, 2018
Thank you kindly for both replies. > @TomG said: > You can integrate flatpickr. how would I go about integrating flatpickr? Do I require to install this? > @bansalpeeyush29 said: > You can use below code in HTML of question text:- > > <!DOCTYPE html> > <html> > <body> > > <h2>Time Field</h2> > > > <form action="/action_page.php"> > Select a time: > <input type="time" name="usr_time"> > > </form> > > > > </body> > </html> Thank you very much for your detailed reply. I believe there`s two sections* CSS and javascript. Where do I insert these codes?

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • Answer
  • June 11, 2018
Check the https://flatpickr.js.org/getting-started/flatpickr getting started page. Add the CSS and JavaScript to your survey header under Look&Feel. Attach to the text input in your question using jQuery.