Search the FirstSpirit Knowledge Base
Hi,
I will use a Toolbar Plugin to create a new folder on MediaStore, how can I do that?
I have a form with my info, Folders name and parent media folder, how can I process and use this info to create my folder on press the save button.
best regards
zava
You do not have to worry about the save button. The ShowFormDialogOperation will return the result of the form when returning from perform(). As stated in the API, the result is either null (when the form was cancelled) or a FormData object containing the values.
Cheers,
Stefan
Hi Zava,
Unfortunately, you are not giving much away on what you have done so far. I am assuming that you have the plug-in in place and the form you posted came from calling the respective operation from a script.
If so, the operation will return the data filled in the form and you can read the input from it (http://www.e-spirit.com/odfs50/access/de/espirit/firstspirit/forms/FormData.html).
Having the information back and being still in the script, you can use the API of MediaFolder (http://www.e-spirit.com/odfs50/access/de/espirit/firstspirit/access/store/mediastore/MediaFolder.htm...) to create a new subfolder.
Hope this helps,
Stefan
Hi Stefan,
thank you for your answer.
You are right, I wrote my plugin script, with a "normal" execute method and the result ist the form you can see in the screenshot.
Unfortunately execute run on start, and I dont understand how can I save the infos write in this form when I press save...
The save button belong the Form Obejct? or ShowFormDialogOperation Object?
You do not have to worry about the save button. The ShowFormDialogOperation will return the result of the form when returning from perform(). As stated in the API, the result is either null (when the form was cancelled) or a FormData object containing the values.
Cheers,
Stefan
Grande Stefan,
you are right, I worry too much
thanks
best ragards
zava