4. But if I use this form and hit Save or Close and error occurs on Redirect. The reason seem to be, that after updating the database the variables should get passed to the redirect URL, too. This is not the case. - How can I do this?
For your specific need you can use Select dynamic cascade where options of the second (and optionally third) cascade are retrieved using ajax
"...This is not possible as form fields only have values after the form is saved..."
But in my case the values are there BEFORE the form is created. They are passed via GET/POST. I want to use these values in severeal dynamic fields which then calculates there option fields on the server side depending on these values before the form is sent to the browser. - So it is not about client side data manipulation.
In my eyes, with the dynamic field it should be possible to read in existing data from the URL or from other fields (or it should be possible to do some calculations, like date/time stuff) and use it right in the SQL statement - "before" the field values are calculated.
How else I could solve my use case: Select a one or more lists of cities (dynmic fields) depending on a given country I do pass through the URL?
Thanks for your help. Finally I could figure it out:
Here an example of the Dynamic Select Field SQL-Statement with URL-parameter I use in the Form Type:
SELECT a.id AS value, a.title AS text FROM #__content AS a INNER JOIN #__cck_store_form_xxxxxx AS b ON (b.id=a.id) WHERE a.catid = 11 AND a.state = 1 AND b.myparamfield = $uri->get('myparam');
The value of myparam is another dynamic select field in the Search section of a List & Search, from which the Admin User is entering the Form & Content. There parameter is sent under List -> Nr. 2 -> Link select Form and open the Popup by clicking on the +-symbol next to "Form". - There in the field "Custom variables" add:
After doing all this I noticed that the Save Button did not work any longer - as I described in my first post of this thread.
I added a Seblod Button Free which points to the form and which I added the the parameter, similar to List -> Nr. 2 -> Link.
Hope all this makes sense and is of help for someone.