Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to specify form markup #23

Open
richardtape opened this issue Aug 1, 2014 · 3 comments
Open

Add ability to specify form markup #23

richardtape opened this issue Aug 1, 2014 · 3 comments

Comments

@richardtape
Copy link

Hi there,

In order to be able to fully integrate this within WordPress (or any other platform which provides native comment forms) it'd be great to have the ability to say "Hey, this is my comment form textarea. It has an ID of #comment-form (for example). Use that."

This way, I can use the native WP Comment Form (and all of the hooks that it provides) so any plugins which tie into that form should just work.

What do you think?

@aroc
Copy link
Owner

aroc commented Aug 10, 2014

I don't think it's a necessarily a bad idea, but I'd prefer not to make changes to the project to support a single platform and I don't see this being particularly useful in other scenarios. With WordPress, are there problems hooking into the events that get fired from SideComments then making an ajax request to the backend to save the comment? Are the WP hooks not fired if it's done this way?

If there's an issue with that, you may also be able to hook into the event and and copy over the values then trigger submission of the form.

Otherwise, if the project does go this route, we'd need to talk through a little more how this feature would work. For example, if you provide an ID for an alternative textarea of form, does SideComments copy that node over to the right spot on initialization?

@richardtape
Copy link
Author

I'm not sure I explained myself properly. I'm saying don't embed the form yourself. Allow someone else to specify the markup for the form itself. Does that make more sense? As you've seen I've got your js working as a WP plugin, but as it's an entirely JS solution, there's no way to use WP's native comment form markup (and hence all of the hooks that get used)

@aroc
Copy link
Owner

aroc commented Aug 11, 2014

Ah okay, I see what you're saying. To help give me a better idea of what the differences are, can you post an example of the form markup you might use and what the differences might be that you need? I'm just trying to get an idea of how this might fit into the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants