Add text in the middle of a form | Community
Skip to main content
October 9, 2013
Question

Add text in the middle of a form

  • October 9, 2013
  • 4 replies
  • 1376 views
I'm wondering if anyone knows how to add a line of text in the middle of a form. We have a form with 6 fields and between fields 4 and 5 we want to add some instructional text. Does anyone know how to do this?
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Level 7
October 9, 2013
You can write some CSS or JavaScript that adds space between specific form fields, and add it to your landing page. Then you can add a block of text where you created the space in the form.
October 10, 2013
As an FYI, we are building this feature into the new Forms editor.  More details on availability coming soon!
October 10, 2013
Wait for Forms2.0
Level 10
October 10, 2013

Here is some sample javascript code. In the below sample code one line is added after the 4th field

 

<script type="text/javascript">

jQuery(document).ready(function(){

var class_name = 1;

jQuery("li").each(function(){

jQuery(this).addClass("class"+class_name);

class_name ++;

});

         jQuery('.class4').after('<li><strong>Subheading</strong></li>');

});

</script>