[wp-hackers] Frontend form

Mo Braga Mo.Braga at LBi.com
Fri Aug 19 08:40:35 UTC 2011

...or, more likely, empty lines before the opening <?php tag.

-----Original Message-----
From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-bounces at lists.automattic.com] On Behalf Of Florin Maduta
Sent: 18 August 2011 21:32
To: wp-hackers at lists.automattic.com
Subject: Re: [wp-hackers] Frontend form

Check the files for spaces after closing php tag. I'm prety sure that this is the problem

On Thu, Aug 18, 2011 at 11:08 PM, Diana K. Cury <dianakac at gmail.com> wrote:

> Thanks for reply Eric,
> I will test some more and post the code soon. The most strange is if I
> add the form and form processing code after template calls
> (get_header, sidebars etc), I get the "headers already sent", (both
> for page templates or shortcode insertion). It seems something to do with template header itself.
> The processing code should stay before all the html header, or not
> really necessary?! If so, that will be a lot of filterings for get the
> shortcode feature done.
> Quite not sure if I should implemente this in my plugin...is an one
> time use form, a shortcode maybe aren't the best aproach for this isn't?!
> ----- Original Message ----- From: "Eric Mann" <eric at eam.me>
> To: <wp-hackers at lists.automattic.**com
> <wp-hackers at lists.automattic.com>>
> Sent: Thursday, August 18, 2011 3:18 PM
> Subject: Re: [wp-hackers] Frontend form
>  We'd have to see what code you're using in the form to diagnose the
>> "Headers
>> already sent" issue, but typically this is due to either `echo`ing
>> content too early in WP's execution or trying to modify the page
>> headers too late in WP's execution.
>> My guess is that you're trying to use some kind of HTTP redirect
>> within the content of the page ...
>> As for preventing the browser's back button ... don't.  It's bad form
>> to modify the behavior of the browser like that, and the user might
>> have a legitimate reason to use the back button.  Instead, just
>> validate the form to prevent duplicate submissions - i.e. use a nonce
>> to detect whether or not this is a repeat submission and reject the
>> re-submission.
>> On Thu, Aug 18, 2011 at 10:51 AM, Diana K. Cury <dianakac at gmail.com>
>> wrote:
>>  I have a working frontend form, for create post types.
>>> Using as a template for pages: works nice, I'm able to create the
>>> post I get redirected to the them right after the process.
>>> When I tried to implement this form as a plugin shortcode, I got
>>> "Headers alredy sent ". The post is created as well, but doesn't
>>> redirect to the post.
>>> Also, is there someway to prevent going back in history and
>>> re-submit the form again? I know there's a lot of plugin for this,
>>> but that is a very simples static form.
>>> ______________________________**_________________
>>> wp-hackers mailing list
>>> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>
>>> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lis
>>> ts.automattic.com/mailman/listinfo/wp-hackers>
>>>  ______________________________**_________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>
>> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://list
>> s.automattic.com/mailman/listinfo/wp-hackers>
> ______________________________**_________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.**com <wp-hackers at lists.automattic.com>
> http://lists.automattic.com/**mailman/listinfo/wp-hackers<http://lists
> .automattic.com/mailman/listinfo/wp-hackers>
wp-hackers mailing list
wp-hackers at lists.automattic.com

Confidentiality notice
This communication is from LBi Ltd, a private limited company registered in Scotland with registered number SC177425 having its registered office at 51 Timberbush, Edinburgh, EH6 6QH.
This electronic message contains information which may be privileged and confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or e-mail as above immediately.

More information about the wp-hackers mailing list