Forum .LRN Q&A: Re: Dynamical Forms

Collapse
2: Re: Dynamical Forms (response to 1)
Posted by Laetitia Duby on
After a look at the acs-lang tcl files, I added a variable as :
set list_of_books [db_list_of_lists books_loop { select mybook_title, book_id from mybooks order by mybook_title }]
And I reference this variable in the form :
{myarticle_book:text(select) \
		{label "Included in : "}
		{options $list_of_books} 
}
But an error appears and I don't understand it :
can't read "element(options)": no such element in array
    while executing
"template::widget::menu  $element(name) $element(options) $element(values) attributes $element(mode)"
    (procedure "template::widget::select" line 11)
    invoked from within
"template::widget::$element(widget) element $tag_attributes"
    (procedure "template::element::render" line 10)
    invoked from within
"template::element::render add_art myarticle_book {  }"
    ("eval" body line 1)
    invoked from within
"eval template::element::$command $form_id $element_id $args"
    (procedure "template::element" line 2)
    invoked from within
"template::element render ${form:id} myarticle_book {  } "
    invoked from within
"append __adp_output "[template::element render ${form:id} myarticle_book {  } ]""
    ("uplevel" body line 185)
Does someone know what I'm doing wrong ?

Laetitia