How to include a meteor-based form on an external website?

Hi guys,

let’s say I have a meteor-app that can server contact-forms
and writes those into a mongo-database.

This form I want to show on different webpages which are NOT build in meteor.

Is this possible to do at all?
If yes: what approach would you recon???

An iframe would be the best solution I think.


Either an iFrame or a JS DDP client will work. The iFrame is a much simpler solution, but you won’t be able to pass data easily between the outside and inside frames – only user input to the inner frame will be able to go to the Meteor server.

1 Like

Thanks for the inspiration guys!! :slight_smile:

Will I be able to grab the current URL of the external website from within the iframe?

Plus I am just thinking: The form is hooked up to quite a big application, so it would probably also be best to seperate the small form from the big app so that the external page does NOT need to load the whole app. So I’ll have 2 apps writing into the same mongo, which should be possible.

Yes until code splitting is possible a separate small app is about the only solution. Though: If you expect the user will always proceed to the app (like a login page on a website) then it might be better to just use the same app. Because then it will already cache the whole app in the browser which makes proceeding after the login form faster.

For a commercial form, like a mailinglist signup, the small app might be better suitable.

1 Like