How to use Default and Eval for textarea element?

sales2010

Well-Known Member
Hello,

I have added a query into Default area for a textarea element which should retrieve the values from another table from database. All is well for new records.

Because sometime the values from the "main" table are changed, when i edit the form i need to display the values retrieved by query, and not the value recorded for this row.

So, if the option "Eval" is enabled, the values from box "Default" should always display the result of the query/code.

I can't use the calc element since i need to edit the data from textarea.

Thank you
 
Default value (eval'ed or not) is used only if it's a new record.

Not sure what you want to achieve.

You could fill the field with a form php plugin (onLoad)
$string =your code;
$formModel->_data['table___element']=$string;

The user can edit this text and the edited text is stored in the database (and shown in list view)
but
the next time the form or details view is displayed it's showing the actually calculated text.

Or maybe some JS.
 
Hello troester,

What i need is basically a calc element which automatically update the contained data based on selections made in another elements and (this is the most important part) allow users to edit the info..

in this case, the data will be a html table filled with some values from database; i need to let editors to play with it and add/remove rows and columns if necessary
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top