I am doing this : echo \do_shortcode('[cred-form form="632"]'); in a slider that is using a template file
and the cred form shows up, but all the formatting is wrong.
When I use the same cred form in a page, it works fine.
How do I get the cred form to show up with the correct formatting in a template file?
in a slider that is using a template file
Hi, it depends on what you mean by "using a template file". If the Form markup is correct but the styles are not, then it could be:
1. The stylesheets required by Forms are not being enqueued correctly because Forms doesn't recognize that you have placed the Form anywhere on the page
2. The stylesheets used by Forms are enqueued but they are being overridden by other stylesheets applied by your template
3. AJAX is being used to update the slider and Forms on those AJAX updated slides are not initialized correctly
4. Something else I can't predict
If the problem is #2, then you can remove the conflicting styles applied by your template. If the problem is #1, then it's not so straightforward. You can try enqueueing the stylesheets manually, you can try changing the way the Form is added to the slider, or you can try adding the Form somewhere it will be recognized by the Forms plugin like a Content Template for this page. Then you can hide that Form with CSS.
My issue is resolved now. Thank you!