The horizontal scrolling is something that's just a default behavior for that input type. It doesn't behave like a textarea so I'm not aware of any way to force line breaks.
What you could do is add a "preview pane" for the text below the field so they can see the entire title displayed. This is similar to what you see in the Gravity Forms admin.. the text changes as you type.
screenshot
<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($) {
$("#input_1_5")
.bind("keyup",
function(){
$("#preview_pane").html( $(this).val() );
});
$("#input_1_5").after("<div id='preview_pane'></div>");
});
</script>
this snippet inserts a div called "preview_pane" directly below the input ID "input_1_5" and writes the contents of that input to the div. You'll just need to change the input ID to match your actual form field ID. After that, you can use some CSS to style the preview pane anyway you see fit.
Hope that helps or at least gives you some ideas.
Posted 14 years ago on Tuesday June 29, 2010 |
Permalink