How to insert newline into Grid's value

Confluence User - 01 Mar, 2017

Hi, 

Just wonder if we can insert a NEWLINE into the Grid's value / FormValue?

I had tried with HTML tab and \n, both doesn't seems to be working. 

For example:row.put("dummyColumn", "string1" + NEWLINE + "string2");

NOte: I'm using CommunityEdition 5.0

 

grid;formgrid

3


02 Mar, 2017
confluenceUser
confluenceUser

Hi, did you try using a HTML break <br>?

03 Mar, 2017
confluenceUser
confluenceUser

Try

row.put("dummyColumn", "\r\n");

or

row.put("dummyColumn", "<br/>");

see which works...

reference: Load & Store Form Grid Data Using Bean Shell Form Binder

27 Mar, 2017
confluenceUser
confluenceUser

Trying to add the html tag.. it seems doesn't work.. 

When viewing the page source, it is converting the the different encoding

<td><span id="field3_link" name="field3_link" class="grid-cell">&lt; a href=google.com&gt; link&lt;/a&gt;</span> <input name="field3_link_0" class="grid-input" type="hidden" value="&lt; a href=google.com&gt; link&lt;/a&gt;" /></td>

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print