Hi Couch!!!
How to change the "k_author", "k_email" and "k_comment" to just "author", "email" and "comment" ?
How to change the "k_author", "k_email" and "k_comment" to just "author", "email" and "comment" ?

<cms:if k_error >
<cms:each k_error >
<cms:show item />
</cms:each>
</cms:if>
<cms:if k_error >
<cms:if k_error_k_author >Your name is required<br/></cms:if>
<cms:if k_error_k_email >Your Email is required<br/></cms:if>
<cms:if k_error_k_comment >Please enter something as comment<br/></cms:if>
<cms:if k_error_captcha >Captcha is incorrect<br/></cms:if>
</cms:if>
KK wrote: Hi,
The answer lies in how you choose to process the error condition of a Couch form (http://www.couchcms.com/docs/concepts/forms.html).
From the screenshot it appears to be the following (where we are simply iterating through the generic 'k_error' variable that contains error messages for all fields) -
- Code: Select all
<cms:if k_error >
<cms:each k_error >
<cms:show item />
</cms:each>
</cms:if>
You can make that code into the following where we check for each individual field and output the message of our choice -
- Code: Select all
<cms:if k_error >
<cms:if k_error_k_author >Your name is required<br/></cms:if>
<cms:if k_error_k_email >Your Email is required<br/></cms:if>
<cms:if k_error_k_comment >Please enter something as comment<br/></cms:if>
<cms:if k_error_captcha >Captcha is incorrect<br/></cms:if>
</cms:if>
Hope this helps.