• Resolved wpdia

    (@wpdia)


    It outputs fieldname26 text only when i clicked “.submit” . How can i get “fieldname26” data from Jquery ? Thank you so much .

    Here i added below jquery codes to the HTML content.

    <script>
    function silentSubmission(e)
    {
    $(“.submit”).click(function(){
    $(“.display-message-here”).append(“<table><tr align=’center’>”
    +”<td >”+” fieldname26 “+”</td>”
    +”</tr></table>”);
    });
    }
    </script>

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @wpdia,

    If you are in a different context than the equations, you should access to the field’s value using jQuery:

    
    <script>
    function silentSubmission(e)
    {
    $(".submit").click(function(){
    $(".display-message-here").append("<table><tr align='center'><td>"+jQuery('[id*="fieldname26_"]').val()+"</td></tr></table>");
    });
    }
    </script>
    

    Best regards.

    Thread Starter wpdia

    (@wpdia)

    @codepeople

    Thank you so much . Resolved .

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How can i add fieldname data to jquery code ?’ is closed to new replies.