is it possible create different chain between Fabrikforms?

samani

Member
hi.
simplify of my problem:
i have 3 form A , formB , formC , form D
i need this:
when user fill formA with checked checkbox2, then submit data and redirect to form B
when user fill formA with checked checkbox3, then submit data and redirect to form C
am i must use redirect php plugin of form for form A?
if i want decide according some data of form A and B to redirect him to form D or not what need to do?
how to access to form A and B when i want decide to redirect to where? is it need to query to database to collect data of form A and B?
 
Use 2 redirect plugins and write your conditions to redirect.
Try to get data from form B with query. I think that this is possible.
The data from form A can access with placeholders.
 
Yup, that's correct.

You can use conditions on multiple redirect plugins. Just make sure only one condition returns true, otherwise it's "undefined" as to which one will be used (either the first or the last, I'm not sure).

What I usually do when "daisy chaining" forms with redirects is to have a hidden FK (foreign key) element on "form B", which stores the rowid (PK) of form A, so (say) an element called form_a_id, which has an eval'ed default of ...

Code:
return $this->app->input->get('forma___id_raw');

(or whatever the full element name of the ID element from form A is, with _raw appended).

And yes, data from the form you are submitting (form A) is available as placeholders. Data from other forms would need to be loaded with a query, which would presumably use some value from an element in form A as the key to load the required row. Probably the rowid, looking up the FK stored as per my hint above.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top