Hi, In an XWiki Application I created I want to make sure documents created within it get named in a specific pattern from the fields filled inside them.
Currently I use a custom button to redirect the user to a new document with a dummy name so he doesn't need to fill the name (that should get overwritten anyway on saving) but only the relevant fields. Something like #set ( $createDocLink = $xwiki.getURL($document, 'inline', "template=${escapetool.url($urlTemplate)}&parent=${escapetool.url($urlParent)}&title=${escapetool.url($urlTitle)}") ) This leads to a new document as defined in the application sheet with the name 'New document'. Now I want the user to fill 3 fields ('freetext1', 'freetext2', 'dropdown1'), click 'Save & View' or a custom button. Then the document should be saved as '<freetext1> - <freetext2> (<dropdown1>)' and the user should be redirected to that page in view mode. I've tried different approaches including a temporary creation page with the 3 fields as HTML input fields (can't use the applications dropdown), event listeners (the redirect after saving doesn't work) ... Additionally the same must be done when a page is edited (one of the 3 fields is changed). Please help me find a sane approach before I bite the table. Regs, Dennis