[1]

kris
Guest
May 12th, 2009 at 3:53 pm

Wordpress Version: 2.3.3

TDO Mini Forms Version: 0.10

Operating System (if known): N/A

Webserver Software: N/A

Link to Website: http://www.spotifylinks.com

Error Message:
Copy and paste any error messages here

Is it possible to use a form on an external page outside of wordpress?

I am trying to build a subsite that will load a form from tdo mini forms and submit to wordpress.

I saw some code on how to load the form using php a while ago and can not find it. With this code will the form work on an external page?

Permalink | Quote

[2]

Mark Cunningham
Guest
May 12th, 2009 at 3:54 pm

If you can show me the code I’ll tell you.

It depends on what you mean by “external page”? Do you mean a Wordpress Page (i.e. not a post) or do you mean completely outside of the Wordpress site?

Permalink | Quote

[3]

Kris
Guest
May 12th, 2009 at 4:46 pm

Completely outsite of a wordpress site if possible.

I have been having a play around and still not had any luck.

I have found this to embed the form:

I am asuming I need extra code to initialise the the tdo form plugin externally.

Permalink | Quote

[4]

Mark Cunningham
Guest
May 26th, 2009 at 2:04 pm

This worked for me on my test site. I created a new php file. I had to load up Wordpress before excuting the form, but it works and all the form behaviour works.

<?php
// Load up Wordpress:
// Make sure the path to wp-load.php is correct.
//
$wp_load = realpath("../wordpress/wp-load.php");
if(!file_exists($wp_load)) {
  $wp_config = realpath("../wordpress/wp-config.php");
  if (!file_exists($wp_config)) {
      exit("Can't find wp-config.php or wp-load.php");
  } else {
      require_once($wp_config);
  }
} else {
  require_once($wp_load);
}
// Display Form
//
if(function_exists('tdomf_the_form')) {
    // Change 1 to the form id of the form you wish to display
    tdomf_the_form(1);
    // You can also supply a post id, if you want to edit a post
    #tdomf_the_form(1,365);
} else {
    exit("TDO Mini Forms plugin is not enabled");
}
?>

There are a few limitations though. The style sheet used by the from is not automatically included, you’ll have to hack that in yourself. However AJAX and normal post method work.

Permalink | Quote

[5]

Kris
Guest
May 26th, 2009 at 2:28 pm

That is great I will have a play with the code this week. Thanks for your help I will post back if I encounter any problems.

Permalink | Quote

[6]

konfus
Guest
November 2nd, 2009 at 4:08 pm

I have some problems with special characters like ö or ß, already changed the collation of some fields to utf8_general_ci, but it doenst help.

If you write a post and use special characters it just cuts your content right before the character.

Anyone who can help?

Permalink | Quote

[7]

Jake
Guest
November 25th, 2009 at 1:15 pm

That doesn’t work.
Can anyone suggest anything else?

Permalink | Quote

Advertisments

Join the Discussion