you’re trying to add text to the element itself, that’s what causing the error.
In case this element ‘text_field’ is a label you could use the property text (so: element.text_field.text) to add text.
But I get the feeling things are different, so let’s get things straight:
you’re talking about an element ‘elements.text_field’ what type of element is this (text_field/text_area/label) AND what dataprovider is attached.
You’re also referencing ‘text_field’, assuming this is a dataprovider.
So what are you trying to accomplish?
adding text temporarily to a text you retrieved from the database
adding text to the text that’s already in the dataprovider?
Marc,
What I’m trying to accomplish is to add temporarily add text to a text_field that is displaying data from a column in a database.
In your suggestion “element.text_field.text” the “.text” is not an option.
I guess my question should be - how to display the text of the element and temporarily add additional text based on the condition on “columnX”?
In general you can’t change data in form fields. You change it in their data providers which means you will actually be changing the stored data (when using table columns).
This also means that you can’t really use fields on a form without a data provider, or to be more precise it would be useless since you can’t do much with it.
So to do non-destructive changes to data for display purposes only you can use (un-stored) calculations (like you already figured out) or use form- or global variables as a data provider.