What exactly are they? I used doc2form and got a contact form working with a response email which grabs info from a dictionary item I have created. That's all good, but what is it?? No good me just saying, "oh well, it works", and not then learning how or why it works. I also created a hostname on top level node (after reading Dirks post about doc2form) - why did I need to do that/what did it do?
Any help as always is greatly appreciated :) thanks.
Dictionary items are used when you have multiple languages versions of your site.
A simple example - If you have a searchbox on you site and you need to serve the "Submit" text in more than one language you can use dictionary items to do this. Let's say you need to have an english version and a danish version. Then you would create a dictionary item where you can write the english word and the danish word. (If you have added more languages under "languages" you should see multiple text boxes for each language you have activated).
Then you can use the dictionary item for search in your XSLT to get the correct term depending on your language.
I don't use multiple languages or anything particularly technical so I still don't really understand why I have used a dictionary item for an email response? I mean, it works, but I just don't get why I would use that method to format an email? Is this a standard way of doing it?
I am using Doc2Form and I have styled out the email which gets sent to the person who fills in my web form by using a dictionary item. Much in the same way as in this post:
I am just trying to understand why I would use this and what it does in this situation? I also created a hostname on the top level node, which I don't know what for.
"Dictionary items will only work if hostnames have been assigned to your (top level) node? Have you done that?" <------ quote from Dirk
Well It's hard to say what is going on in your setup. But if the doc2form package is using the dictionary items out of the box I think it's because the creater (Casey Neehouse) has been forward thinking making sure it's possible to be able to use the form on multiple languages and get the correct content for the specific language in case you needed to make a spanish or german version of the site all of the sudden.
In short the hostname setting makes sure the correct translation is fetched from the dictionary. Without it set Umbraco would not know what language to fetch content for. And IIS would not know, which site to serve to the visitor.
Dictionary items can also be used if you're doing more variants of a site in one language. Let's say you have a restaurant, which exits in two or more cities in a country but they have different opening hours, varying menu's etc. then this could also be handled by using dictionary items.
Thanks for helping, I can see the logic in the multiple language stuff and serving different content for different locations ie I could have the same form response but in 10 different languages depending on who fills the form in and where they are.
Still not 100% on why it would be used in my example. I have created the dictionary item called 'formResponse' so I can style the email that the visitor receives, this is referenced in the macro via emailresponse="#formResponse". I receive a bog standard email with content of customer name: EXAMPLE-NAME , customer email: EXAMPLE-EMAIL, message: EXAMPLE-MESSAGE... the customer on the other hand gets an email containing "Thanks for your enquiry, I will respond asap" etc etc'. The customers' email body contains whatever I put in the dictionary item called 'formResponse'.
I was just wondering why I would do it this way, I have only done this because it works, I have no idea why it works or if there are other methods of delivering email responses from web forms ie advanced messages like the ones you recieve from online stores such as amazon.
If that makes sense? Anyway, I don't want to tie you up with this too much longer!
Well I guess it's just the way the doc2form package handles this? :-)
If you did not use doc2form you could use the umbraco.library:SendMail() extension to send out an e-mail to the person who is submitting the form.
Using this extension you would just create an XSLT with your form and call the SendMail() function on succesfull submit. Then you can get the customers e-mail from the posted form and you can fill out the other variables using the form content as well and the response on the page and the e-mail you want to receive the content from the form on, could be either hardcoded or fetched from a document type in the content tree dependent on your needs. You don't need to make use of dictionary items to achieve this. If you come in a situation where you would need to, it's fairly easy to alter the XSLT macro to handle it.
And it's also possible to build a user control to do it. But I think there are so manye great contact form packages to choose from that it would be a waste of time unless you have some very specific needs. But I bet that could be handled using Contour :-)
Dictionary items
What exactly are they? I used doc2form and got a contact form working with a response email which grabs info from a dictionary item I have created. That's all good, but what is it?? No good me just saying, "oh well, it works", and not then learning how or why it works. I also created a hostname on top level node (after reading Dirks post about doc2form) - why did I need to do that/what did it do?
Any help as always is greatly appreciated :) thanks.
Sam.
Hi Sam
Dictionary items are used when you have multiple languages versions of your site.
A simple example - If you have a searchbox on you site and you need to serve the "Submit" text in more than one language you can use dictionary items to do this. Let's say you need to have an english version and a danish version. Then you would create a dictionary item where you can write the english word and the danish word. (If you have added more languages under "languages" you should see multiple text boxes for each language you have activated).
Then you can use the dictionary item for search in your XSLT to get the correct term depending on your language.
I hope this makes sense to you? :-)
/Jan
Thanks Jan,
I don't use multiple languages or anything particularly technical so I still don't really understand why I have used a dictionary item for an email response? I mean, it works, but I just don't get why I would use that method to format an email? Is this a standard way of doing it?
Sam.
Hi Sam
Ehm...do you use a package that maybe makes use of it in some way?
/Jan
Hi Jan,
I am using Doc2Form and I have styled out the email which gets sent to the person who fills in my web form by using a dictionary item. Much in the same way as in this post:
http://our.umbraco.org/forum/getting-started/questions-about-runway-and-modules/3545-Styling-Email-in-Doc2Form
I am just trying to understand why I would use this and what it does in this situation? I also created a hostname on the top level node, which I don't know what for.
"Dictionary items will only work if hostnames have been assigned to your (top level) node? Have you done that?" <------ quote from Dirk
Thanks,
Sam.
Hi Sam
Well It's hard to say what is going on in your setup. But if the doc2form package is using the dictionary items out of the box I think it's because the creater (Casey Neehouse) has been forward thinking making sure it's possible to be able to use the form on multiple languages and get the correct content for the specific language in case you needed to make a spanish or german version of the site all of the sudden.
In short the hostname setting makes sure the correct translation is fetched from the dictionary. Without it set Umbraco would not know what language to fetch content for. And IIS would not know, which site to serve to the visitor.
Dictionary items can also be used if you're doing more variants of a site in one language. Let's say you have a restaurant, which exits in two or more cities in a country but they have different opening hours, varying menu's etc. then this could also be handled by using dictionary items.
I hope it makes sense? :-)
/Jan
Hi Jan,
Thanks for helping, I can see the logic in the multiple language stuff and serving different content for different locations ie I could have the same form response but in 10 different languages depending on who fills the form in and where they are.
Still not 100% on why it would be used in my example. I have created the dictionary item called 'formResponse' so I can style the email that the visitor receives, this is referenced in the macro via emailresponse="#formResponse". I receive a bog standard email with content of customer name: EXAMPLE-NAME , customer email: EXAMPLE-EMAIL, message: EXAMPLE-MESSAGE... the customer on the other hand gets an email containing "Thanks for your enquiry, I will respond asap" etc etc'. The customers' email body contains whatever I put in the dictionary item called 'formResponse'.
I was just wondering why I would do it this way, I have only done this because it works, I have no idea why it works or if there are other methods of delivering email responses from web forms ie advanced messages like the ones you recieve from online stores such as amazon.
If that makes sense? Anyway, I don't want to tie you up with this too much longer!
Sam.
Hi Sam
Well I guess it's just the way the doc2form package handles this? :-)
If you did not use doc2form you could use the umbraco.library:SendMail() extension to send out an e-mail to the person who is submitting the form.
Using this extension you would just create an XSLT with your form and call the SendMail() function on succesfull submit. Then you can get the customers e-mail from the posted form and you can fill out the other variables using the form content as well and the response on the page and the e-mail you want to receive the content from the form on, could be either hardcoded or fetched from a document type in the content tree dependent on your needs. You don't need to make use of dictionary items to achieve this. If you come in a situation where you would need to, it's fairly easy to alter the XSLT macro to handle it.
And it's also possible to build a user control to do it. But I think there are so manye great contact form packages to choose from that it would be a waste of time unless you have some very specific needs. But I bet that could be handled using Contour :-)
Hope this helps.
/Jan
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.