Quote:I would like to post a short tutorial on this feature - if you like - in the next week or two based on my findings. Its amazing what a little knowledge can lead to.
That would be terrific!
The Smarty + PHP options in the Pages modules have been very helpful for my own work: you can call any smarty template or Form Tools code directly there, so it's really cut down on development time (no more manual creation of pages containing custom logic). But speaking candidly, the PHP + Smarty feature isn't well documented simply because most people don't delve that deep, so my time has been focused elsewhere.
Quote:Finally - and it's not urgent - but would help (and maybe lead to another tutorial) - do you have a few lines of Smarty code I could use to check out how the Smarty mode works? I will then go off to Smarty world (web site) and find out what can be done from there.
Sure! For starters, take a look at the contents of the /global/smarty/plugins folder. That folder contains a whole bunch of Form Tools-specific functions for use in Smarty pages. Those are what's used throughout the actual Form Tools pages to display chunks of code, like dropdown lists of forms, Views, option lists etc.
As a simple example, the following will output a dropdown list of all forms, followed by a dropdown of all clients.
Code:
Forms: {forms_dropdown name_id="forms"}<br />
Clients: {clients_dropdown name_id="clients"}
It's a crude example, because that information won't be very useful in of itself. But you can build on that to (for example) auto-redirect to the appropriate form page or edit client page after an option is selected. To do that, you'd add an onchange parameter to each.
Code:
Forms: {forms_dropdown name_id="forms" onchange="alert(this.value)"}<br />
Clients: {clients_dropdown name_id="clients" onchange="alert(this.value)"}
(I just did the alert for example purposes). Each Smarty function allows for different parameters, so it's a matter of sifting through the different functions to see what additional parameters are available.
Hope that gives you an idea... Anyway, good luck!
- Ben