0

I have an external html form that I would like to add to my wordpress developed site.

The form links to other areas in the business like the cashiers, so when customers fill the form out, the content is added to their system.

I have seen different ways such as adding raw html and adding as media however these do not allow me to edit the form as the visual composer stops working after I paste in the html code.

What other options do I have if any.

0

If you want to have a form on a page, there are plugins that allow that; a popular one is "Contact Form 7". But if you want a specific 'action' page to fire when the submit button is used, then it might be best to create a page template.

The template could include the form code and the 'action' of the form tag could call another page (and template) that would process the form then display a page.

Learn more about templates here: https://codex.wordpress.org/Templates .

And it would be best to put the templates in a Child Theme (if you aren't using your own custom theme), so any theme updates don't overwrite your changes. (Although custom-written templates aren't overwritten on the theme update, unless you have changed a theme-supplied template.)

0

I figured out that you can not directly have a html form display correctly on a page. To work around this, I added the html document to the media and then linked directly to this using the generated hyperlink.

  • If you put the HTML code in a template, and use the template for the page, then it should display properly. Assuming that you tweak the form's CSS as needed to match your theme. Just copy the single-page template, add your form code in place of the page's query output, then create a page that uses that template. See my answer for the link to how templates work. – Rick Hellewell Jan 11 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.