Doc2Form message styling Options
azzlack
Posted: Thursday, April 17, 2008 9:14:59 AM

Rank: Devotee

Joined: 8/5/2007
Posts: 59
Location: Bergen, Norway
Is it possible to style the FormMessage in Doc2Form?

I have tried to insert <div style="etc..."> elements in there, but the resulting form just screws up...

www.eyecatch.no
neehouse
Posted: Thursday, April 17, 2008 10:48:33 AM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,038
Location: Charleston, West Virginia, United States
I have seen some people succeed at styling the form, though, it can be rather tedious.

Start out with simple styles, and work your way up. Be sure to encode you tags if you are doing them directly in the macro. If that is too tedious, try using a dictionary field or even a document property (on the display doc, not the form doc) that has the layout...

Dictionary > FormMessage="#Message"
Doc Prop > FormMessage="[#Message]"

Also, be warned, a comma in your message can hose up the message if included directly. It is a macro property parsing feature that breaks on commas. To get around that, use one of the two methods listed above.

• 2007/2008 MVP • 2008/2009 MVP • Core Developer • Certified Professional Level I & II •
drobar
Posted: Thursday, April 17, 2008 2:37:06 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,256
Location: KY, USA
After a LOT of trial and error, this is what I use on some of my forms. I wanted something very pretty but finally decided on something quite basic... you just have to love how various email clients (don't) handle html and css.

Casey's right about the comma... Like the one between the city and state/province/country. I ended up not including a comma in the output because it broke my template.

I didn't try using dictionary items. And for the version of AutoFormPlus/Doc2Form that I'm using I don't need the # symbol. Perhaps newer versions do need it.

Code:

FormMessage="&lt;div style=&quot;font-family:Serif; color:#000099;&quot;&gt;&lt;b&gt;[first_name] [last_name]&lt;/b&gt;
&lt;a href=&quot;mailto:[email]&quot;&gt;[email]&lt;/a&gt;
[job_title]

&lt;u&gt;Company&lt;/u&gt;
[company]
[address_1]
[address_2]
[city]
[state]
[zip_code]

&lt;u&gt;Comments&lt;/u&gt;
&lt;i&gt;[questions_and_comments]&lt;/i&gt;

&lt;/div&gt;"
      >


cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
bootnumlock
Posted: Thursday, April 17, 2008 4:27:28 PM

Rank: Fanatic

Joined: 10/9/2006
Posts: 333
is this related to the email message being sent? i have had success using dictionary items for the content of the email. Granted you still don't get full style support, but you can use commas and linebreaks effectively and predictably.

bootnumlock - aka bob baty-barr [http://www.baty-barr.com]
Level 1 Certified!
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.