ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Disallowed Key Characters error when using stand-alone entry form,

July 26, 2007 3:46am

Subscribe [1]
  • #1 / Jul 26, 2007 3:46am

    Tiger0516

    31 posts

    Hi EE’ers

    I am using stand-alone entry form. After I submit the form, I got “Disallowed Key Characters” error.

    Here is the simple stand-alone entry form template I am using:

    {pTitle} is a custom field

    <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN” “http://www.w3.org/TR/REC-html40/loose.dtd”>
    <html lang=“en”>
    <head>

    <title>Untitled</title>


    </head>
    <body>

    {exp:weblog:entry_form weblog="proposals" return="proposals/submit"}

    <h1>Please complete the form below to submit your proposal</h1>

    Entry Title

    <input type=“text” name=“title” id=“title” value=”{title}” size=“50” />

    URL Title

    <input type=“text” name=“url_title” id=‘url_title’ value=”{url_title}” maxlength=“75” size=“50” />

    Proposal Title: <input type=“text” id=”{pTitle}”  name=”{pTitle}” size=“20” />


    <input type=“submit” name=“submit” value=“Submit” />

    {/exp:weblog:entry_form}

    </body>
    </html>

     

    If I use the default stand-alone entry form code, then it is fine: I can submit entries successfully.

    Any idea why?

    Thanks!

  • #2 / Jul 26, 2007 10:11am

    Robin Sowell

    13255 posts

    Do a ‘reveal code’ on the resulting form- the {pTitle} isn’t parsed.  I suspect that’s the problem.  If you’re trying to hard code a form, you’ll need to hard code the name and id for pTitle - and the name needs to be field_id_x - where ‘x’ is the id for the custom field in question.  It’s doable, though.  However, preview isn’t really going to work unless you get creative. 

    One easy way to see what should be going on?  Put the default tags back- view the rendered form’s code- copy that and use it to hard code what you need.  Make sense?

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases