Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Comment Form Manipulation
Hi-
I’m wanting to change the preview and submit buttons in the comment form from “input type=‘submit’” tags to “button type=‘submit’” tags (if you’re unfamiliar with what I’m talking about Particle Tree has a good article about it here )
I know enough PHP to make me dangerous, and in PHP file /textpattern/publish/comment.php, I’m seeing that the way the forms are generated are by an array, which suggests this may be really difficult. I’d like to stylize my buttons and this is the biggest hurdle. Any and all help would be much appreciated!
Offline
Re: Comment Form Manipulation
I think I had a similar desire and I was able to use type=“image” instead of type=“submit” in my comment form.
Basically, I found that you need to use the txp tags for comment form building except for the preview/submit buttons. It’s possible to use HTML instead. Start by seeing the resulting HTML code from the txp tags: txp:comment_preview and txp:comment_submit. Use that HTML instead of the tags and then modify as you like.
This is what mine looks like:
<txp:if_comments_preview>
<input type=“image” name=“submit” src=“btn-form-submit.gif” value=“submit” alt=“submit” title=“submit” class=“button” />
<txp:else />
<input type=“image” name=“submit” src=“btn-form-submit-inactive.gif” value=“submit” alt=“submit” title=“submit” class=“button” disabled=“disabled” />
</txp:if_comments_preview>
<input type=“image” name=“preview” src=“btn-form-preview.gif” value=“Preview” alt=“preview” title=“preview” class=“button” />
If there is a better way, please let me know.
Last edited by typeshige (2007-12-14 05:20:49)
Offline
Re: Comment Form Manipulation
Yeah, that makes sense, I’m not sure why I didn’t think of that before. Thanks!
Offline
Pages: 1