Is it possible to add javascript to the HTML form to create dynamic features?

  • Profile Image
    Brandon
    Asked on April 03, 2012 at 09:20 PM

    Let's say, for example, I want to create a form which a user can use to create a background for a webpage of any color or decor. Is it possible to integrate javascript into the form, and if so how could I do that, so the script will create a background according to whatever request is submitted in the form?

  • Profile Image
    jeanettebmz
    Answered on April 03, 2012 at 09:27 PM

    @Brandon

    I have made a research into the forum threads , and found out that javascripts are not allowed to be embedded into Free Text HTML fields.

    This rule is put in place to prevent problems arising from conflicts with the embedded scripts and the form's own scripts.

    Jeanette

     

  • Profile Image
    abajan
    Answered on April 03, 2012 at 10:26 PM

    If a copy of the form's source is acquired from the Embed Form Wizard (Setup & Embed tab > Embed Form) JavaScript can be added to the page within which the said source has been pasted to achieve various effects, as illustrated on this page. The block of JavaScript just before the closing body tag of the page plus the onKeyUp event handlers in the input tags is what enables the behavior you see.

    Being a bit familiar with the capabilities of JavaScript, I believe the functionality you are seeking is possible. However the $64,000 question is how to do it! I'll see what I can come up with but some of our colleagues may well already have a solution or two for you.