Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

Converting text to textfield or binding for XML

Avatar

Former Community Member

V8.2.1

In a table:

Is there a way to convert a "text" cell type to a "textfield" cell type while maintaining the text as a caption for the new textfield? Reason being I have hundreds of them to convert and nothing is preserved when changing from "text" to "textfield".

Alternatively, how can I bind a "text" cell to output something in XML when exporting form data? Specifically I need to somehow maintain a count on each row behind the scenes to give each row a unique identifier.

Thanks.

3 Replies

Avatar

Level 10

Hi,

If you select the text object and go to the Object > Field palette. There you can go to the Type dropdown and select textfield. LC Designer will change the type to textfield and set the caption using the original text (this is the case in LC Designer ES2 (v9).

You cannot get a text oject to participate in an XML export.

Hope that helps,

Niall

Avatar

Level 10

Sorry,

Just reread the second part. If you change the static text object for the index number to a textfield/numericfield then you can set the row number.

If the table is static, then just set the cell in each row to a default value and make it read only (see Object > Value palette).

If the table is dynamic, then you will need script in the layout ready event to set the row number. See example here: http://assure.ly/gk8Q7a

Hope that helps,

Niall

Avatar

Former Community Member

Yea I pretty much realized this is completely impractical to alter everything and / or setup calculated textfields. I just added a column and manually counted from 1 for each row.

It's not pretty, but it's better than the alternative, these textfields are spread across pages / forms and even PDF files. Thanks for trying.