August 27, 2011

Adding FrontPage forms with Expression Web

Microsoft removed the ability to create FrontPage forms in Expression Web, but left in the ability to edit existing forms. I've just found that it's easy to create a FrontPage form manually. Caveats: -- I've tested this on multiple sites, and so far it's worked perfectly, but you should of course test everything thoroughly (but you do that anyway, no?) -- I would not normally advise adding any page code that deals with FrontPage extensions and their function, but in this case it works and seems simple enough. -- For those who aren't aware, you need to use a web host that offers FrontPage extensions; and if you use FrontPage extensions, you need to do all of your web editing work with FrontPage or Expression Web or some other application that plays nice with the FrontPage extensions (no FTP). I've been a LunarPages customer for years, and happy with my choice. The process: copy the code below into the body of your web page, while in Code view (to make it easier to place, enter some placeholder text in Design view, and highlight it; then when you switch to Code view, you'll be right there and can just paste the code in place of the already highlighted placeholder). Then when you go back to Design view, you'll see the new form and can make changes as needed. Your standard form items are available in the Toolbox panel under Form Controls.

I couldn't paste the raw html code here and have it remain visible, so in the below, make the following replacements:
[ becomes <
] becomes >

===begin code block, copy everything after this line ====

[form method="POST" action="--WEBBOT-SELF--"]

[!--webbot bot="SaveResults" S-Email-Format="TEXT/PRE" S-Email-Address="emailaddress" B-Email-Label-Fields="TRUE" S-Builtin-Fields="Date Time" startspan S-Date-Format="%Y-%m-%d" S-Time-Format="%I:%M:%S %p %Z" --][!--webbot bot="SaveResults" endspan --]
[p]
[b]
Form starts here and ends at the buttons[/b]       [/p]
[p] [input type="submit" value="Submit" name="B1"][input type="reset" value="Reset" name="B2"][/p]
[/form]