Last active
December 15, 2015 04:29
-
-
Save lukeholder/5201972 to your computer and use it in GitHub Desktop.
craft update form with GUID
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
THIS: | |
<form method="post" action="" accept-charset="UTF-8"> | |
<input type="hidden" name="action" value="entries/saveEntry"> | |
<input type="hidden" name="redirect" value="blog/{{ entry.slug }}"> | |
<input type="hidden" name="GUID" value="{{ entry.guid }}"> | |
<label for="title">Title</label> | |
<input id="title" type="text" name="title" value="{{ entry.title }}"> | |
<label for="body">Body</label> | |
<textarea id="body" name="fields[body]">{{ entry.body }}</textarea> | |
<input type="submit" value="Publish"> | |
</form> | |
VS: | |
<form method="post" action="" accept-charset="UTF-8"> | |
<input type="hidden" name="action" value="entries/saveEntry"> | |
<input type="hidden" name="redirect" value="blog/{{ entry.slug }}"> | |
<input type="hidden" name="entryId" value="{{ entry.id }}"> | |
<input type="hidden" name="sectionId" value="1"> | |
<input type="hidden" name="slug" value="{{ entry.slug }}"> | |
<input type="hidden" name="enabled" value="1"> | |
<label for="title">Title</label> | |
<input id="title" type="text" name="title" value="{{ entry.title }}"> | |
<label for="body">Body</label> | |
<textarea id="body" name="fields[body]">{{ entry.body }}</textarea> | |
<label for="keywords">Keywords</label> | |
<input id="keywords" type="text" name="fields[keywords]" value="{{ entry.keywords }}"> | |
<input type="submit" value="Publish"> | |
</form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment