Here’s an example. This is a completely dynamic form, getting the channel and entry from url segments.
<html>
<head>
<link href="{path=css/_ee_saef_css}" type="text/css" rel="stylesheet" media="screen" />
{exp:jquery:script_tag}
{exp:jquery:script_tag ui="datepicker"}
</head>
<body>
{exp:safecracker channel="{segment_2}" entry_id="{segment_3}" return="safecracker/{segment_2}/ENTRY_ID" error_handling="inline"}
{if global_errors:count}
<ul>
{global_errors}
<li>{error}</li>
{/global_errors}
</ul>
{/if}
{if field_errors:count}
<ul>
{field_errors}
<li>{error}</li>
{/field_errors}
</ul>
{/if}
<fieldset>
<label for="title">Title</label>
<input type="text" name="title" id="title" value="{title}" size="50" maxlength="100">
{if error:title}
<p class="error">{error:title}</p>
{/if}
</fieldset>
<fieldset>
<label for="url_title">URL Title</label>
<input type="text" name="url_title" id="url_title" value="{url_title}" maxlength="75" size="50" />
{if error:url_title}
<p class="error">{error:url_title}</p>
{/if}
</fieldset>
{custom_fields}
<fieldset>
<label for="{field_name}">{if required}* {/if}{field_label}</label>
{if field_instructions}
<p>{field_instructions}</p>
{/if}
{if error}
<p class="error">{error}</p>
{/if}
{formatting_buttons}
{display_field}
</fieldset>
{/custom_fields}
<fieldset>
{status_menu}
<label for="status">Status</label>
<select name="status" id="status">
{select_options}
</select>
{/status_menu}
</fieldset>
<fieldset>
<label for="entry_date">Date</label>
<input type="text" name="entry_date" id="entry_date" value="{entry_date}" maxlength="23" size="25" />
{if error:entry_date}
<p class="error">{error:entry_date}</p>
{/if}
</fieldset>
<fieldset>
<label for="expiration_date">Expiration Date</label>
<input type="text" name="expiration_date" id="expiration_date" value="{expiration_date}" maxlength="23" size="25" />
{if error:expiration_date}
<p class="error">{error:expiration_date}</p>
{/if}
</fieldset>
<fieldset>
<label for="comment_expiration_date">Comment Expiration Date</label>
<input type="text" name="comment_expiration_date" id="comment_expiration_date" value="{comment_expiration_date}" maxlength="23" size="25" />
{if error:comment_expiration_date}
<p class="error">{error:comment_expiration_date}</p>
{/if}
</fieldset>
<fieldset>
<label class="checkbox"><input type="checkbox" name="sticky" value="y" {sticky} /> Make Entry Sticky</label>
<label class="checkbox"><input type="checkbox" name="allow_comments" value="y" {allow_comments} /> Allow Comments</label>
<label class="checkbox"><input type="checkbox" name="dst_enabled" value="y" {dst_enabled} />DST Active on Date of Entry</label>
</fieldset>
<fieldset>
{category_menu}
<label for="categories">Categories</label>
<select name="category[]" id="categories" size="4" multiple="multiple">
{select_options}
</select>
{/category_menu}
</fieldset>
<fieldset>
<input type="submit" value="Submit" />
</fieldset>
{/exp:safecracker}
</body>
</html>