PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Add To Field

  1. How would I add an extra div to the multiple product field?

    I have this code: http://pastebin.com/EFpbpBxk

    but I want it to be outputted to look like this: http://pastebin.com/yx8RQ9C5

    I was looking at http://www.gravityhelp.com/documentation/page/Gform_field_content but I can't seem to get it to work.

    Any help is appreciated

    Posted 13 years ago on Saturday August 20, 2011 | Permalink
  2. I was able to do this with jQuery. Not sure if that will work in your situation or not.

    [js]
    jQuery(document).ready(function($) {
            $('<div class="newdiv" style="background:#FF9;color:#000;">span content</div>').appendTo('ul#input_6_22 li');
    });

    I changed the id to class since the id should be unique and it was repeated in your example.

    Where the content (the new div) is appended is highly dependent on your form markup. I used the form 6, field 22 from the code you pasted as an example. If you need to use it on other fields, you would have to adjust the JavaScript.

    Find out here where you add this code:
    http://www.gravityhelp.com/documentation/page/Where_Do_I_Put_This_Code%3F

    If you need additional help please let us know.

    Posted 13 years ago on Monday August 22, 2011 | Permalink
  3. Thank you, with a bit of tinkering I was able to get the code working the way I needed it to.

    Posted 13 years ago on Monday August 22, 2011 | Permalink
  4. Great. Thanks for the update.

    Posted 13 years ago on Monday August 22, 2011 | Permalink

This topic has been resolved and has been closed to new replies.