create custom forms

A place for users and developers of the Xataface to discuss and receive support.

Postby yusif » Mon Dec 18, 2006 1:48 pm

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.
yusif
 
Posts: 28
Joined: Wed Dec 31, 1969 5:00 pm

Postby zopemgr » Mon Dec 18, 2006 2:18 pm

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
zopemgr
 
Posts: 66
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 32 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved