Programmatically Adding Product from DTML
Sorry if this has been asked before, but is there a way to add a product using DTML that goes to the initial form for setting properties (like id) For example, <dtml-call "manage_addFolder('testfolder')"> causes a folder with an id of 'testfolder' to be created. But, is there a way to go to the form that allows setting the id (instead of directly creating the folder without user interaction). The reason why I am asking is that I created a simple product that uses a form to initialize the product's properties. When, I select the Add drop down list and select my product, this form pops up and the action the form calls creates the product. However, I would like to be able to view a page that will bring up the form and create the product in response to filling out the form. This would allow me to create a site that allows student evaluations to be done (the product is the evaluation scores). If you can point me in the right direction I would appreciate it. Thanks, Vern Vern Takebayashi vern@hcc.hawaii.edu Honolulu Community College ICS/Engineering
On Fri, 2003-10-10 at 14:43, Vern T Takebayashi wrote:
Sorry if this has been asked before, but is there a way to add a product using DTML that goes to the initial form for setting properties (like id)
Yep.
For example,
<dtml-call "manage_addFolder('testfolder')">
causes a folder with an id of 'testfolder' to be created. But, is there a way to go to the form that allows setting the id (instead of directly creating the folder without user interaction).
Yes... it's URL would be manage_addProduct/OFSP/folderAdd
The reason why I am asking is that I created a simple product that uses a form to initialize the product's properties.
In that case, the name of the add form is left up to you. If you have an interface called add*, that's probably it.
When, I select the Add drop down list and select my product, this form pops up and the action the form calls creates the product. However, I would like to be able to view a page that will bring up the form and create the product in response to filling out the form.
Here's a hot tip. Anything the ZMI can do, you can do too. Check out the source behind that drop-down list and you should be able to figure out the URL of your add form. It's probably something like: manage_addProduct/foo/fooAdd where foo is the name of your product. HTH, Dylan
participants (2)
-
Dylan Reinhardt -
Vern T Takebayashi