Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Change comment form button text
I want to change the text on the buttons in my comment forms.
I’m running a Norwegian site but want an English backend, so I’ve downloaded a copy of en-us.txt and translated just the strings related to comment forms, but the “Preview” and “Submit” strings are also used in Txp’s admin area!
I have looked and searched all over, but my findings are these:
- The txp:comment_remember, txp:comment_preview and txp:comment_submit tags take no attributes, and may thus not be given alternate labels.
- There are no plugins written that will allow me to output alternative, more flexible form elements.
- I can’t make a custom form out of the submit button, because it needs to be disabled at first and enabled when the comment has been previewed.
Is there anywhere I haven’t looked?
If there is no current solution, may I suggest taking into consideration making separate preview/submit strings for comment forms in the language file?
Offline
Re: Change comment form button text
Well, why won’t us hand-code those buttons. It’s the same:
<input type="submit" name="preview" value="Preview" class="button" id="txpCommentPreview" />
<input type="submit" name="submit" value="Submit" class="button"<txp:if_comments_preview><txp:else /> class="button disabled" id="txpCommentSubmit" disabled="disabled"</txp:if_comments_preview> />
Change values, Preview & Submit, what you want, and put the code to your comment_form.
Cheers!
Last edited by Gocom (2007-10-16 13:12:32)
Offline
Re: Change comment form button text
Here I was, thinking no one bothered replying, and then I discovered the notification in my junk folder.
Thanks, I didn’t think of using if_comments_preview – hardly knew it existed. I’d actually started looking into making my own plugin …
Your example code isn’t quite in the right order, though:
<input type="submit" name="submit" value="Submit" <txp:if_comments_preview>class="button"<txp:else />class="button disabled" disabled="disabled"</txp:if_comments_preview> id="txpCommentSubmit" />
Offline
Offline
Pages: 1