How can you add text to a results driven text box?
Hi,
Is there anyway for a user to add text to a text box that has a custom script applied?
Joel_Geraci has given the following script which works perfectly, however I'm wondering if there's a way to do the same thing, only allow users to then add/change the text that's generated...any ideas?
Thanks ![]()
(My work around is simply put a separate text box at the side, but wondering if there's a script work around.)
var paras = [];
var fields = this.getField( “CB” ).getArray();
// sort by name
fields.sort( function( a, b ) {
var nameA = a.name.toUpperCase(); // ignore upper and lowercase
var nameB = b.name.toUpperCase(); // ignore upper and lowercase
if ( nameA < nameB ) {
return -1;
}
if ( nameA > nameB ) {
return 1;
}
// names must be equal
return 0;
} );
for ( var i = 0; i < fields.length; i++ ) {
var field = fields[ i ];
if ( field.isBoxChecked( 0 ) ) {
paras.push( field.value )
}
}
event.value = paras.join( "\n\n " )
