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

Theme field on contact form #123

Closed
cmckni3 opened this issue Sep 28, 2015 · 15 comments
Closed

Theme field on contact form #123

cmckni3 opened this issue Sep 28, 2015 · 15 comments

Comments

@cmckni3
Copy link
Contributor

cmckni3 commented Sep 28, 2015

What is the theme field used for on the contact form?

@owen2345
Copy link
Owner

Hello Chris,
I don't understand your question,
Note: contact form is a plugin that generates a shortcode to paste anywhere.
Regards,

@cmckni3
Copy link
Contributor Author

cmckni3 commented Sep 28, 2015

There's a select box that says "Themes" but the select box is empty.

2015-09-28_14-55-23

@cmckni3
Copy link
Contributor Author

cmckni3 commented Sep 28, 2015

ohh, there's a javascript error too.

Uncaught ReferenceError: lang is not defined
lang.message_no_response_fields

@owen2345
Copy link
Owner

fixed on github

@owen2345
Copy link
Owner

the template you need to create in:
your theme/views/html_mailer/my_template.html.erb

@cmckni3
Copy link
Contributor Author

cmckni3 commented Sep 28, 2015

Is that for the frontend view or the email that goes out?

@cmckni3
Copy link
Contributor Author

cmckni3 commented Sep 28, 2015

Might not need #125 if it's the formatting of the email that is sent.

@owen2345
Copy link
Owner

great!

@cmckni3
Copy link
Contributor Author

cmckni3 commented Sep 28, 2015

or by theme on the form, do you mean layout?

@owen2345
Copy link
Owner

you can customize all your emails like this:
layout: create a file called layouts/mailer.html.erb
template: create a file called views/html_mailer/mailer.html.erb

check samples:
template.txt
layout.txt

@owen2345
Copy link
Owner

the other option is not working well and will be removed.
This part of code was built for my collaborator the code is a little ugly, I will rebuilt in future versions.

@cmckni3
Copy link
Contributor Author

cmckni3 commented Sep 28, 2015

Ah ok, I just wrapped a template with render_to_string

Would be nice if it used action_mailer.

@cmckni3
Copy link
Contributor Author

cmckni3 commented Sep 28, 2015

Hmm, what you are describing is a bit too generic though but my solution is a bit generic as well. I think contact form 7 has the same issue though.

@owen2345
Copy link
Owner

Would you like a template selector in the contact form?

@cmckni3
Copy link
Contributor Author

cmckni3 commented Sep 28, 2015

I was thinking about that. That might be the only way to make it really flexible.

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