• I know I have a lot of questions and I;m figuring it out as I go but I have a question. I want to take a value and display it on a div somewhere else in the page. I cant get it to work with anything. Maybe my jquery is wrong..

    I have a div:

    <input type=”text” id=”jzzf_1_element_1″ value=”Invalid formula”></div>

    <div id=”taketext1″> here it is take me </div>

    $(document).ready(function () {
    $(“#taketext1”).html($(“#jzzf_1_addition”).html());
    });

    jzzf_1_addition being the calculated output field but I cant get it to work. I can get it to work if it’s reading a static div but not any calculated div. I tried reading an html output but it only prints:

    {{15+identifier2}}

    Any ideas on what I”m doing wrong?

    This is an awesome plugin though, thanks!

    http://wordpress.org/extend/plugins/jazzy-forms/

Viewing 1 replies (of 1 total)
  • Plugin Author jazzigor

    (@jazzigor)

    Hi Brittany. Nobody every said you could move data in and out from a Jazzy Form with jQuery. Let’s see if we get it to work anyway.

    Some comments:
    – if jzzf_1_addition is an “output” element, you would want to use jQuery’s .val() function instead of html() to get the value
    – you are using jQuery’s “document ready” event to do your stuff. That ensures that your code is executed when the document is ready, but not necessarily after Jazzy Forms has done its job. For “output” elements you can use jQuery’s “change” event and hook your code there. However as far as I know there is no jQuery event that informs you when a DIV has changed.

    Jazzy Forms might have a Javascript API in the future that would allow you to set values and register callbacks for updates. However this is probably too geeky for the kind of users I want to target…

Viewing 1 replies (of 1 total)

The topic ‘[Plugin: Jazzy Forms] jquery reading div field’ is closed to new replies.