I am new to expressionengine, so if the answer to this question is obvious… apologies 😊. However I cannot seem to find a definite answer to this question. is it possible to use the same form for submitting new entries and editing existing ones.
I have created a safe cracker form which seems to work for submitting recipes. However, i cannot seem to get the form to edit recipes :(
Here is the code I am using
{exp:safecracker channel="recipes" return="recipes/view/URL_TITLE"}
<label for="name">Title: <span class="required">*</span></label>
<input type="text" id="name" name="title" value="{title}" placeholder="John Doe" required="required" autofocus="autofocus" />
<label for="message">Recipe Description: <span class="required">*</span></label>
{field:recipe_description}
<label for="categories">Categories</label>
<select name="category[]" id="categories" size="4" multiple="multiple">
{categories group_id="1"}
<option value="{category_id}"{selected}>{category_name}</option>
{/categories}
</select>
<label for="categories">Categories</label>
<select name="category[]" id="categories" size="4" multiple="multiple">
{categories group_id="2"}
<option value="{category_id}"{selected}>{category_name}</option>
{/categories}
</select>
<label for="prep-time">Prep Time: <span class="required">*</span></label>
{field:prep_time}
<label for="cook-time">Cook Time: </label>
{field:cook_time}
<label for="servings">Servings: </label>
{field:servings}
<label for="calorie-count">Calorie Count: </label>
{field:calorie_count}
<label for="difficulty">Difficulty: </label>
<select id="difficulty" name="difficulty">
{options:difficulty}
<option value="{option_value}"{selected}>{option_name}</option>
{/options:difficulty}
</select>
<label for="status">Status</label>
<select name="status" id="status">
{statuses}
<option value="{status}"{selected}>{status}</option>
{/statuses}
</select>
<label for="recipe-pics">Recipe Pictures: <span class="required">*</span></label>
{field:recipe_pictures}
<label for="ingredients">Ingredients: <span class="required">*</span></label>
{field:recipe_ingredients}
<label for="prep-instruct">Preparation Instructions: <span class="required">*</span></label>
{field:preparation_instructions}
<label for="recipe-pics">Recipe tags: <span class="required">*</span></label>
{field:recipe_tags}
<input type="submit" value="Holla!" id="submit-button" />
<span class="required">*</span> indicates a required field
{/exp:safecracker}and this is the code I am using to link to the edit template
<a href="http://{path=recipes/edit/{segment_3}}">Edit your recipe!</a>Any help will be greatly appreciated.
T.