I'm trying to help my developer write for me a control that I need (not a developer myself). It is a control to be used on contact forms. In any form created in template or with RTE you insert this macro between FORM tags and control does the rest and that is:
- if not PostBack - injects few more hidden fields to use for some antispam techniques - if PostBack, checks if form is spam using several techniques, ...then posts results (all posted fields with their values) to chosen email adress
... so basicaly this is form2mail with antispam control.
I told you all this maybe only to motivate you top help me... everything works on test server (not Umbraco), but when I create macro from this control and implement it - control isn't getting any posted values! My developer says he is using "IsPostBack" and that it works on test but he doesn't (want to?) know anything about Umbraco and why control isn't getting any postback in that environment.
Umbraco doesn't change this behaviour, so it must be something else in the control. I think the best way is to convince the developer to attach a debugger and step through all the code lines.
Thank you!!! Problem was not exactly what you suggested... it was not 2 FORM tags with runat server but ZERO :) I forgot runat server attribute. Now it works ok. If anybody is interested, after some polishing and testing we might package it and publish it.
Ups, one problem stil remains. This works only if I create my form in template, and use <form runat="server">, but if I try to create my form inside some content using same syntax, it does not work. TinyMCE is not a problem, I've configured it to allow those tags, it saves them ok. When I view source of my outputted page with a form, on templated version don't see runat="server" and it works ok, but on content version I can see it in outputed HTML (runat=server) and it does not work.
It seems like form from content is not parsed by server or something. Any ideas how to make content version work too? I would like to avoid having to make template if possible
control not geting postback values
Hi,
I'm trying to help my developer write for me a control that I need (not a developer myself). It is a control to be used on contact forms. In any form created in template or with RTE you insert this macro between FORM tags and control does the rest and that is:
- if not PostBack - injects few more hidden fields to use for some antispam techniques
- if PostBack, checks if form is spam using several techniques,
...then posts results (all posted fields with their values) to chosen email adress
... so basicaly this is form2mail with antispam control.
I told you all this maybe only to motivate you top help me... everything works on test server (not Umbraco), but when I create macro from this control and implement it - control isn't getting any posted values! My developer says he is using "IsPostBack" and that it works on test but he doesn't (want to?) know anything about Umbraco and why control isn't getting any postback in that environment.
Can you help me with some example or anything?
Check if you are having more than one form tag with runat server integrated. That was a problem for me.
hth, Thomas
Hi,
Umbraco doesn't change this behaviour, so it must be something else in the control. I think the best way is to convince the developer to attach a debugger and step through all the code lines.
Cheers,
Richard
Thank you!!! Problem was not exactly what you suggested... it was not 2 FORM tags with runat server but ZERO :) I forgot runat server attribute. Now it works ok. If anybody is interested, after some polishing and testing we might package it and publish it.
Ups, one problem stil remains. This works only if I create my form in template, and use <form runat="server">, but if I try to create my form inside some content using same syntax, it does not work. TinyMCE is not a problem, I've configured it to allow those tags, it saves them ok. When I view source of my outputted page with a form, on templated version don't see runat="server" and it works ok, but on content version I can see it in outputed HTML (runat=server) and it does not work.
It seems like form from content is not parsed by server or something. Any ideas how to make content version work too? I would like to avoid having to make template if possible
Hi,
You Can't include the Form tag in the content of TinyMCE indeed. It must be in the template, otherwise asp.net will not parse that.
Cheers,
Richard
is working on a reply...