Hi
I would like to make ‘name’ as an optional field. If unregistered users want to put comments they can do. However they will have the option of putting their name.
A working version of the code below would be much appreciated. Thanks
{exp:comment:form channel="{channel_name}” form_class=“comment_form” entry_status=“not draft|pending|closed”}
{if logged_out}
<input type=“text” name=“name” value=”{name}”/>
{if name ==""}
{name = 'anonymous'}
{/if}
<input type=“hidden” name=“email” value=“[email protected]” />
<textarea name=“comment”>{comment}</textarea>
<input type=“submit” id=“comment-submit” value=“Post your comment!” class=“button_input” name=“submit”>
{if:else}
<textarea name=“comment”>{comment}</textarea>
<input type=“submit” id=“comment-submit” value=“Post your comment!” class=“button_input” name=“submit”>
{/if}
{/exp:comment:form}
Moved to CodeShare Corner by Moderator