We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How can I make a SafeCracker contact form POST only (no editing) in EE 2.2.1?

Development and Programming

bgarrant's avatar
bgarrant
356 posts
14 years ago
bgarrant's avatar bgarrant

I have a simple contact form that works well. I only want people to be able to POST the form and do not want to allow editing. I use SafeCracker for the forms. How can I do this as the Channel/Member Group only as a permission for allowing POST and EDIT together? If I setup the form without the VALUE field, will that be enough to disallow editing like this example?

{exp:safecracker channel="contact_form" return="contact/thanks" } 
<input name="title" type="text" /> 
<input name="my_custom_field" type="text" /> 
<input type="submit" value="Submit" /> 
{/exp:safecracker}

I see other examples have it setup as you see below which looks like it is editable. Do I just need to remove the VALUE parameter to disallow editing?

{exp:safecracker channel="contact_form" return="contact/thanks" } 
<input name="title" type="text" value="{title}"/> 
<input name="my_custom_field" type="text" value="{my_custom_field}" /> 
<input type="submit" value="Submit" /> 
{/exp:safecracker}

Thanks in advance.

       
bgarrant's avatar
bgarrant
356 posts
14 years ago
bgarrant's avatar bgarrant

Is this all I need to do?

       
the3mus1can's avatar
the3mus1can
426 posts
14 years ago
the3mus1can's avatar the3mus1can

As long as you do not pass it an entry_id param you will not be editing an entry. It will just be creating new entries.

       
bgarrant's avatar
bgarrant
356 posts
14 years ago
bgarrant's avatar bgarrant

Thank you so much for the clarification.

Bryan

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.