Javascript code new line

Avatar

Avatar
Level 1
ingart52176331
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile

Avatar
Level 1
ingart52176331
Level 1

Likes

0 likes

Total Posts

1 post

Correct reply

0 solutions
View profile
ingart52176331
Level 1

16-04-2018

Ok, sorry for the question, it might have been answered before but need help... I am making a table in Livecycle with buttons for adding new rows. Have found the script for this, and it is working.    So now we need to be able to add a new line inbetween the other rows. This would be a row without columns with the same width of the table so the users of the form could seperate between different numbers when scrolling through the form...

The row is to be added with the click of a button...

And also when the users click the «new row» button, it will continue below this row.

Hope this is understandable.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
MinusZero
Level 4

Likes

30 likes

Total Posts

326 posts

Correct reply

54 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
MinusZero
Level 4

17-04-2018

Note sure if this is what you were after.

I created a simple table with two rows, one row has 4 cols, has a button to show the second row and is visible. The second row has the cells merged and is hidden.

I have a button to create 'new rows' positioned outside the table. The trick is to wrap the table in a subform and repeat the subform (sfTable), NOT the table (Table1). So instead of creating new rows, you are actually creating whole new tables wrapped in a subform. The page also needs to be flowed.

1468088_pastedImage_0.png

1468089_pastedImage_1.png

form1.#subform[0].sfTable.Table1.Row1.btnShowRow::click - (JavaScript, client)

this.resolveNode("RowMerged").presence = "visible";

form1.#subform[0].btnNewRow::click - (JavaScript, client)

this.resolveNode('form1.#subform._sfTable').addInstance(1);

if (xfa.host.version < 😎 {

xfa.form.recalculate(1);

}

What this does is this:-

You can keep adding new rows (subforms) and in each instance you can show (unhide) the single merged row if you wish. Note: I havent added a hide button.

1468090_pastedImage_5.png

Answers (0)