• Resolved Atanas Yonkov

    (@nravota12)


    Hi team!

    I am trying to set up theme demo import which features this plugin, however form css is missing until I navigate to plugin existing form and press “save”. I wonder if there is a way to save post programatically, just after demo import (I am using One Click demo Import plugin to import posts). The reason for this is that the form html appears in the existing forms after the xml import, however it is broken (css not working). Only after I update plugin form by clicking the save button, the css gets displayed and the form appears fixed. Any idea how to fix that?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @nravota12,

    Can you let us know where exactly you are pressing the “Save” button in our plugin? Any screenshots would be helpful.

    Thread Starter Atanas Yonkov

    (@nravota12)

    Hi Harish,

    I created a form with some custom css, saved it as xml file and try to import it to another website. However, strangely, the plugin css is not loaded the first time One Click Demo import runs on new WP installation and the form looks very ugly (everyting else gets exported, incl. custom css that I have added). The form appears as it should (plugin css gets loaded) only when I navigate to MC4WP => Form and click save changes: IMAGE

    Before that, I can see the same html, however, form looks very different and it magically works when I click save button

    Maybe you can try yourself with following html to run One Click Demo Import plugin (or probably WordPress Importer will do) to check if the form will look the same after the import (and before navigating to the form and pressing “save changes”:

    <h2>Subscribe to our newsletter</h2>
    <p>
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation.
    </p>
    <span>
    	<input type="email" name="EMAIL" placeholder="Your email address" required />
    </span>
    <span>
      <input type="submit" value="Sign up" />
    </span>
    Plugin Contributor Lap

    (@lapzor)

    Hi,

    A field in the options table is setup upon save that tells WordPress what stylesheets to load for what form, so that that doesn’t have to be checked on each pageload. You would need to set that option manually to make this work with that plugin. You can check in your options table what the correct value is for your use case.

    Hope that helps. If you have any questions, please let me know!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Is it possible to save form programatically?’ is closed to new replies.