17488 Posts in 4473 Topics by 1978 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 989 Views |
-
FormAction display query

25 September 2008 at 2:22pm
How to use FormAction to display query from DataObject?
-
Re: FormAction display query

25 September 2008 at 4:42pm
well formaction fires a function. You can see what function when you make your form
new FormAction("doSomethingCool", "Do Something");
and that will call a function called doSomethingCool which should be in the same file as that last piece of code (not the same function but in the same file). The doSomethingCool function recieves 2 pieces of data - the form and the data in the form so it would look something like
function doSomethingCool($data, $form) {
// the $data stores all the values in the form. You can access it like any array eg $data['SomeField'];
}and in that function it will where you would do your DataObject query.
-
Re: FormAction display query

25 September 2008 at 10:00pm Last edited: 25 September 2008 10:01pm
By referring to your example, from doSomethingCool, i don't know how to make the DataObject query available to the template.
Currently what I did in the form action is, I cache the field value into Session and redirect to another page that will read the field value from session and do the query.
What I'm trying to do is to create SearchForm (with multiple field) for specific DataObject and display the result of the search.
| 989 Views | ||
|
Page:
1
|
Go to Top |


