I am using doc2form for a comments section on my website, the form creates a new node as a child node of the page the form is on, currently it names the child node the same name as the parent node but with RE: at the start. Is there a way to specify what the child node created by the doc2form will be called? Ideally I would like it to get its name from one of the fields on the form. Any ideas?
Not sure which version you have but my hacked version allows you to pass in property to use to name the document the macro field is called PageTitleFieldAlias.
Excellent, this is just what I need, basically I wanted the Comment to be called by the name of the person posting the comment, so now I can have show title set to 1, put "Name" in TitleName and remove the field I am currently using for Title Name.
This is an OLD subject, hope it's OK I update a bit :)
I have just made doc2form work after some experimentation, but found the limitation of nodename a bit annoying. Specifically I was missing an option to have a nodename different from RE:... and still not bother users with an input field with nodename.
So this is what I did (explained for noobs like myself...)
1) added new property to doc2form macro: CustomNodeName of TEXTSTRING type
Find the cs file in /app_code directory on your site. Remember do NOT make a backup in same directory of the cs file, all files in that directory is parsed and you will get an error about already defined namespace. (may seem obvious, but took me a while to discover). So copy a backup into a local drive and store it.
3) I can now use macro parameter CustomNodeName in macro calls to set nodename to whatever I choose. Users do not have to type anything.
Example: site.local/commentpage.aspx?nodename=helloWorld where you catch helloWorld using CustomNodeName ="[@nodename]". Alternatives are comma separated, as in CustomNodeName="[@nodename],Alternative_Title_here"
Thank you to creators of doc2form for making it SO simple to improve!
Doc2form new node name
Hi,
I am using doc2form for a comments section on my website, the form creates a new node as a child node of the page the form is on, currently it names the child node the same name as the parent node but with RE: at the start. Is there a way to specify what the child node created by the doc2form will be called? Ideally I would like it to get its name from one of the fields on the form. Any ideas?
trfletch,
Not sure which version you have but my hacked version allows you to pass in property to use to name the document the macro field is called PageTitleFieldAlias.
Regards
Ismail
Hi Trfletch,
Not realy the answer to your question to be honest, but you could use the Axendo Form Designer to solve that problem.
http://www.axendo.nl/umbraco-packages/axendo-form-designer
Ron
There are 2 properties of the Macro you need to set:
ShowTitle="1" TitleName="LabelName"
This will then add a form field to the form with the label "TitleName" which will then get saved as the node name.
Dan
Hi,
You can use the two properties at Doc2Form to specify the nodename:
ShowTitle="1" <--- This specify that the user should enter the title (nodename). If not specified, then RE:[nodename] is used.
TitleName="" <--- This is the label shown to the user for the textbox for entering the title (nodename)
Note: The title/nodename control will be the first one.
Hope that help you further.
Martin
Excellent, this is just what I need, basically I wanted the Comment to be called by the name of the person posting the comment, so now I can have show title set to 1, put "Name" in TitleName and remove the field I am currently using for Title Name.
This is an OLD subject, hope it's OK I update a bit :)
I have just made doc2form work after some experimentation, but found the limitation of nodename a bit annoying. Specifically I was missing an option to have a nodename different from RE:... and still not bother users with an input field with nodename.
So this is what I did (explained for noobs like myself...)
1) added new property to doc2form macro: CustomNodeName of TEXTSTRING type
2) modified doc2form.ascx.cs. See changes I made at http://pastebin.com/jaJwVQdN
Find the cs file in /app_code directory on your site. Remember do NOT make a backup in same directory of the cs file, all files in that directory is parsed and you will get an error about already defined namespace. (may seem obvious, but took me a while to discover). So copy a backup into a local drive and store it.
3) I can now use macro parameter CustomNodeName in macro calls to set nodename to whatever I choose. Users do not have to type anything.
For those that did not know: you can put various parameters into the macro call. This is explained here: http://our.umbraco.org/wiki/reference/templates/umbracomacro-element
Example: site.local/commentpage.aspx?nodename=helloWorld where you catch helloWorld using CustomNodeName ="[@nodename]". Alternatives are comma separated, as in CustomNodeName="[@nodename],Alternative_Title_here"
Thank you to creators of doc2form for making it SO simple to improve!
Use this if you like. No warranty!
It saved my bacon Torben !! You rock ! ;)
is working on a reply...