Jump to content
  • 0

Can I insert a video in the datapage?


Hayleyy
 Share

Question

Hello,

I'm planning to write a data page that enable the user to watch a video first, then answer the question. Then the answer to that question decides the next video to watch. I was planning to use multi-step data pages to do this. Is that correct?

However, I didn't find a way to insert the video in the data page. Also, I'm not sure how to jump to the next video based on the answer. Could anyone give me some suggestions? Thanks in advance!

 

Hayley

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

Hello @Hayleyy,

1) If the video files are stored in the Files section of your Caspio account, you may use the <video> tag inside the HTML block.

For example:

<video width="320" height="240" controls>
  <source src="[@field:Video_file/]" type="video/mp4">
  Your browser does not support the video tag.
</video>

Also, you may firstly host a video in the hosting site, for example, YouTube, copy the video embed code and paste it to the HTML block.

For both options, there is an issue with  iOS devices that cannot render the video correctly and the issue with Safari browser.

 

2) It is possible to redirect the user depending on the selected answer. The solution is described in this article https://howto.caspio.com/tech-tips-and-articles/common-customizations/dynamic-redirects-after-form-submission/

This should work for Radio Buttons, Dropdown, Listbox Form Elements. 

The idea is to display the answers (in your example) and use a URL to redirect as a Value:

whVMLRl.png

Then use this field as a Destination after record submit:

NjD0Bqr.png

Link to comment
Share on other sites

  • 0
On 5/27/2021 at 8:31 AM, CoopperBackpack said:

Hello @Hayleyy,

1) If the video files are stored in the Files section of your Caspio account, you may use the <video> tag inside the HTML block.

For example:


<video width="320" height="240" controls>
  <source src="[@field:Video_file/]" type="video/mp4">
  Your browser does not support the video tag.
</video>

Also, you may firstly host a video in the hosting site, for example, YouTube, copy the video embed code and paste it to the HTML block.

For both options, there is an issue with  iOS devices that cannot render the video correctly and the issue with Safari browser.

 

2) It is possible to redirect the user depending on the selected answer. The solution is described in this article https://howto.caspio.com/tech-tips-and-articles/common-customizations/dynamic-redirects-after-form-submission/

This should work for Radio Buttons, Dropdown, Listbox Form Elements. 

The idea is to display the answers (in your example) and use a URL to redirect as a Value:

whVMLRl.png

Then use this field as a Destination after record submit:

NjD0Bqr.png

Thanks a lot for your answer! 

Following the redirection instruction, I know how to redirect the user based on their answer. However, the answers are used only for redirection,  but are not stored in the Tables. I forgot to mention that I need to store their answers as well. 

Is there a way to store answers while redirecting the users?

 

Thanks,

Wenwan

Link to comment
Share on other sites

  • 0

Hello @Hayleyy,

Since you need to store the answers, you may try the following:

1) Use a real field from the table to submit answers. For example:

Piwg47o.png

2) Add the Virtual field, set it to the Calculated Value and use the CASE statement there. 

When the field is set to the Calculated Value it is possible to hide it by checking the "Hide Field" checkbox on the Advanced tab. 

Rz61kAm.png

You may learn more about the CASE statement in this external article if needed https://www.w3schools.com/sql/sql_case.asp

3) And again set the "Destination after record submit" as a Virtual field:

DY4kCqL.png

 

Feel free to update this thread if you have further questions. 

Link to comment
Share on other sites

  • 0
On 5/31/2021 at 2:20 AM, CoopperBackpack said:

Hello @Hayleyy,

Since you need to store the answers, you may try the following:

1) Use a real field from the table to submit answers. For example:

Piwg47o.png

2) Add the Virtual field, set it to the Calculated Value and use the CASE statement there. 

When the field is set to the Calculated Value it is possible to hide it by checking the "Hide Field" checkbox on the Advanced tab. 

Rz61kAm.png

You may learn more about the CASE statement in this external article if needed https://www.w3schools.com/sql/sql_case.asp

3) And again set the "Destination after record submit" as a Virtual field:

DY4kCqL.png

 

Feel free to update this thread if you have further questions. 

It worked! Thank you so much! 

I have one more question. Would it be possible to make sure the participants watch the entire video before moving on to the next page (to answer questions)?

 

Link to comment
Share on other sites

  • 0

Just to add on @Meekeee's answer above, if you're videos are inside your Google drive. you just need to copy the sharable link of that specific video and change the "view?usp=sharing" at the end of the link to "preview".  That link can now be used a source on your HTML video tag.

Ex. 

https://drive.google.com/file/d/1Ae-otLad3N2m6OFPcE123sbo4UeRu2KoH-/view?usp=sharing should be https://drive.google.com/file/d/1Ae-otLad3N2m6OFPcE123sbo4UeRu2KoH-/preview

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...