Page 1 of 1

PostPosted: Mon Dec 18, 2006 1:48 pm
by yusif
Hi Steve,
I want to create an action that when clicked will display a page with a select list. When an index in the list is selected it passes the value to some php file that acts as the source for an IMG tag on the same page(i.e. the page that was displayed). Actually the php file generates a graph in GIF format.

Basically what classes can I use to create my own form elements and have actions linking to it etc.

Thanks in advance.

PostPosted: Mon Dec 18, 2006 2:18 pm
by zopemgr
There are a few strategies you can use here. If you want to put this in a custom action, look at the HTML_QuickForm class (http://pear.php.net/HTML_QuickForm) which comes bundled with Dataface.
For forms, you just have to make sure that you add a hidden field for '-action' so that the form will submit back to the same action script.

Alternatively, if this graph is meant to be stored with a record, you could just use the normal edit form, with a Container column. You an use an afterSave() trigger to generate the appropriate graph depending on the other values in the record.

There are likely many other ways to achieve this sort of thing too... just depends on which way you prefer.

-Steve