Help - Search - Members - Calendar
Full Version: Edit comment in preview?
Movable Type Community Forum > Additional Resources > Tips and Tricks
btrott
That's on the todo list.
morbus
Silver,

I've implemented this on my dummy site. It's not perfect. You can see me wax poetic about it on this thread - although it does get remotely techish. Just ignore all that stuff wink.gif
silvercube
Is there any way to have an "Edit Comment" form in the comment preview template? This way, a reader could edit their comment without having to press their browser's Back button.

My template would look roughly like this:

PREVIEWED COMMENT
The potential comment, nice and pretty. Includes a Post Comment button.

EDIT COMMENT
A form similar in appearance to the original post comment form, except with the potential comment's values automatically filled in their respective fields. This form would act independently of the one used to post the unedited comment above.

PREVIOUS COMMENTS
Other comments posted to the entry in question.

The first and last components are already part of the default template, so I know they're possible to implement. It's just that second component that has me wondering. I'm thinking I could use the MT comment preview tags (MTCommentPreviewBody, etc.) in the value= attribute of the INPUT tag and between the TEXTAREA tag pair to have the form filled in automatically. But what should be in the action= attribute of the FORM tag? (This is all assuming, of course, that this method even works.)

And is it possible to use the same MT tag more than once in a template? I'll obviously have to use a few tags at least twice to achieve the desired effect.

Thanks a bunch!

Update: This is my mockup of the comment preview template. It looks pretty, but it's only a mockup. The forms aren't meant to be submitted, for example.
silvercube
I'll probably have to shelve comment previewing this time around — not a huge loss, really. I'm patient.

Just wanted to take the opportunity to thank you for everything you've done so far. For one, I'm glad to know that you're listening! smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.