Expand my Community achievements bar.

SOLVED

Expaning a text field inside a table (part deux)

Avatar

Level 5

Good Day All.

Well, thanks to Niall I was able to get the text field to expand when one than one line was added to a text field inside a table. Now I seem to have a logic problem. When I click (see code below) the expand button, the row expans to show all the text. The issue, when I click to shrink the row, nothing happens. One more interesting thingy, When the text field is blank and you hover over the "expand" button, the tool tip reads "Show all of the text..." But

when the row is expaned, and you hover over the button, the tool tip reads "Show all of the text..."

I am wondering if this migt be caused by me using Version 8.0 of LifeCycle Designer??

Regards

Chomp

if (this.resolveNode("caption.value.#text").value == "q")

{

this.resolveNode("caption.value.#text").value = "u";

this.assist.toolTip = "Show all of the text...";

this.border.fill.linear.type = "toBottom";

this.border.fill.color.value = "247,217,185";

this.border.fill.linear.color.value = "236,187,74";

description.h = "0.3937in";

yourOptions.h = "0.3937in";

delivery.h = "0.3937in";

}

else

{

this.resolveNode("caption.value.#text").value = "q";

this.assist.toolTip = "Hide overflow text...";

this.border.fill.linear.type = "toBottom";

this.border.fill.color.value = "209,228,203";

this.border.fill.linear.color.value = "122,180,112";

description.minH = "0.3937in";

yourOptions.minH = "0.3937in";

delivery.minH = "0.3937in";

}

Script

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

First I would not recommend going into the XML Source tab to change object settings. You can access the repeating settings in the Object > Binding tab when you have the repeating object selected.

Give that a try. I suspect that you have not set it to repeat:

Parallels Desktop1.png

Hope that helps,

Niall

View solution in original post

7 Replies

Avatar

Level 10

Hi,

I don't think it is a LC Designer v8 issue. I have set the target version back to Acrobat/Reader v8 and it does not show any warnings.

The form works here, so can you check that the objects used in the script all exist on your form.

Also when previewing the form, press Control+J to open the JavaScript console. When you interact with the form, any errors should show up here.

Can you share your version of the form or report back on the console errors (if any).

Thanks,

Niall

Avatar

Level 5

Thanks Niall;

This is the message I am getting from the consol. I created a "test form that only had the 1 subform and the table.

Is it possible that you can tell me how to upload the form? I have a feeling that it might be an object problem

description is not defined
19:XFA:form1[0]:#subform[0]:#subform[1]:Table1[0]:Row2[0]:showHide[0]:click
description is not defined

Thanks

Chomp

Avatar

Level 10

Hi Chomp,

Yes, 'description' is the name of an object in the original form. Either you have deleted the object OR your object has a different name OR the button and object are now separated by a subform.

Either way, the error is saying that Acrobat does not recognise 'description' as an object.

If you look again at the original example you will see that the three lines accessing the .h values relate to the name of the three objects in the row.

Parallels Desktop1.png

In your form anywhere you access the .h or .minH property, you need to have the names of the objects right.

Hope that helps,

Niall

Avatar

Level 5

Niall, thank you.... I had forgotten all about that.

I have run into something that is neither generating erros within LC or erros in the java consol.

I have added the "Add row" button and low and behold it does not add a row. this is the line of code I added to the button

"Table3.Row1.instanceManager.addInstance(1);" It is the 3rd table in this form and it is named table3. Row 1 appears to be named correctly as it is the row with the input fields. The top row of this table is a header row.

When I click on the button..... Nothing. As I said...... no errors what so ever

Thanks

Chomp

Avatar

Level 5

Oops. There was an error... It did not show until I closed down LC and restarted. The Java consol stated

"GeneralError: Operation failed.
XFAObject.addInstance:1:XFA:form1[0]:#subform[0]:time_subform[0]:addbtn[0]:click
The element [max] has violated its allowable number of occurrences.

The only place I found "max" was at located in one of the header row cells. It states: <value>

<

value>

<

font typeface="Arial" weight="bold"/>

<

margin bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm" topInset="0.5mm"/>

<

para hAlign="center" vAlign="middle"/>

</

draw>

<

border>

<

edge presence="hidden"/>

</

border>

<occur max="-1"/>

occourance

occourance

text>Comments</text>

</

text>Comments</text>

</

value>

<

font typeface="Arial" weight="bold"/>

<

margin bottomInset="0.5mm" leftInset="0.5mm" rightInset="0.5mm" topInset="0.5mm"/>

<

para hAlign="center" vAlign="middle"/>

</

draw>

<

border>

<

edge presence="hidden"/>

</

border>

<occur max="-1"/>

occourance

occourance

Avatar

Correct answer by
Level 10

Hi,

First I would not recommend going into the XML Source tab to change object settings. You can access the repeating settings in the Object > Binding tab when you have the repeating object selected.

Give that a try. I suspect that you have not set it to repeat:

Parallels Desktop1.png

Hope that helps,

Niall

Avatar

Level 5

Thanks Again Niall..... That was exacly what the problem was...... One of these days I will get it

Thanks Again

Chomp