• Resolved thomasmunoz

    (@thomasmunoz)


    Hi there,

    I am trying to integrate a third party (which runs on my current website) form into a wordpress page.

    You can see that form here :https://2m.com.au/translators.html

    The developer has sent me the files of the form which include php, styles, javascript/jquery and 2 mySQL tables.

    So far I have been able to sort of insert partially the form (just a few questions would display) via a custom php file (where I pasted the code sent form the developer) that I use as the page template. Although I am not getting the full form properly.

    I have very limited javascript skills, anyone has an idea how I could work this out ?

    Thanks for helping.

    Kind regards
    Thomas

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi Thomas,

    After seeing the form, I personally think that rather than inserting this form using PHP/JavaScript, it is a lot better to recreate it. WordPress has great form plugins which will allow you to create this form very easily. Some of these plugins are Contact Form 7, Caldera Forms, Ninja Forms, Gravity Forms etc.

    You can easily create this form without any technical knowledge on any of these plugins. If you are looking for an exact recommendation, go with Caldera Forms. It is free, very easy to use and has a great support base. This is the easiest way and also the best way for you to get that same form on your WordPress Website.

    Thank you and Peace.

    • This reply was modified 7 years, 10 months ago by szeeshanali. Reason: Typos
    Moderator bcworkz

    (@bcworkz)

    Recreating the form is certainly an option, but seeing as you already have the form’s code, I’d be pretty reluctant to recreate it since it’s all there already. There is an advantage with building something you understand instead of inheriting something you don’t. You could perhaps cut and paste some of the more tedious elements into a form plugin’s interface.

    If the form’s code makes no use of WP resources at all, the code should all work as a standalone PHP web page. Of course such a page would not have your site’s styling, header, footer, menu, etc. Adding the code to a proper custom page template should work as well, then it’ll be styled like your site. Getting JavaScript and especially jQuery working within WP can be a bit of a challenge.

    The form does not appear to be heavily JavaScript driven, so I’m unsure why you only get a few questions. It could just be a simple syntax error. For example, imported code, depending on the source, could inadvertently have curly quotes substituted in place of the required straight quotes. Basic debugging should resolve the problems, but it’s beyond the scope of these forums to help with that.

    What’s going to be faster? Debug the current code, or recreate it using a different system that is known to work but has its own learning curve?

    Thread Starter thomasmunoz

    (@thomasmunoz)

    Hi all,

    Thank you for your answers.

    Szeeshanali: I already tried the ninja form plugin but some questions (languages per example) have +150 options that I added one by one and the form doesn’t handle it I have been having trouble saving and publishing (simply can’t do it) and the plugin support hasn’t been able to solve that issue yet.
    I might give a try to caldera form then, thanks for this.

    bcworkz: Indeed what is causing problem is the javascript more specifically the questions with a large number of options such as country or languages. See for these questions the developer has inserted a SQL database query. The options of these questions has been stored in SQL tables and the form display these options when we get to these fields.

    I noticed that the form display properly until it gets to one of these questions, then it wouldnt display the rest of the form, I tried to remove of the questions and then it would display the following questions properly (until it get to another one of these SQL query questions). So that is causing the display issue and I can’t get it to work.

    Thanks to both of you.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Insert a third party form into a wordpress page via custom javascript’ is closed to new replies.