Regarding answer format | XM Community
Skip to main content
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.

!
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>
You can integrate flatpickr.
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?
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.

Leave a Reply