Regarding answer format | XM Community
Solved

Regarding answer format


Badge
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.
!
icon

Best answer by TomG 11 June 2018, 02:34

View original

4 replies

Userlevel 7
Badge +33
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>
Userlevel 7
Badge +27
You can integrate flatpickr.
Badge
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?
Userlevel 7
Badge +27
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