Inquiries Maker Rails 5.2.6 application. Uses RabbitMQ as message broker/queuer, Sneakers as an ActiveJob adapter for background jobs/workers and Postgres as database. Each entity runs in its own docker container. Orchestrated with docker-compose, for production or staging. But it also has a Capistrano setup for a lesser production server.
No issues yet.
This application requires:
The current forms on this application are not limited to it and can be embedded in
any kind of application or website with or without JavaScript involvement.
The form will be be full screen. But can be responsive to fit in a
limited width container or for mobile view.
Example of a php short-code function for a WordPress web-application page.
Shortcode:
[uos_form src"moving"]
# theme/functions.php
// Add Shortcode
function get_uos_form( $atts ) {
// Attributes
$atts = shortcode_atts(
array(
'src' => '',
),
$atts,
'uos_form'
);
// form types
$inquiry_type = array(
'moving' => '//RAILS_APP_URL/moving_inquiries/new',
'cleaning' => '//RAILS_APP_URL/cleaning_inquiries/new',
'combined' => '//RAILS_APP_URL/combined_inquiries/new',
);
// Return custom iframe code
return '<iframe src="'. $inquiry_type[$atts['src']] . '" style="" name="Umzug Offerte Schweiz - Umzug Offerte Form" scrolling="no" width="100%" height="1500"
style="
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
max-width:100%;
" allowfullscreen="">
</iframe>';
}
add_shortcode( 'uos_form', 'get_uos_form' );
Example of a simple HTML iframe.
<iframe src="//RAILS_APP_URL/combined_inquiries/new" style="" name="Umzug Offerte Schweiz - Umzug Offerte Form" scrolling="no" width="100%" height="1500"
style="
position: absolute;
top:0;
left: 0;
width: 100%;
height: 100%;
max-width:100%;
" allowfullscreen="">
</iframe>
<script type="text/javascript" src="https://www.l2.io/ip.js?var=userip"></script>
<script>
var receiver = document.getElementById('iFrameResizer0').contentWindow;
setInterval(function(){
receiver.postMessage({
"hostname": window.location.hostname,
"path": window.location.pathname,
"referrer": document.referrer,
"ip": userip // from "https://www.l2.io/ip.js?var=userip"
}, '*');
}, 1300);
</script>
Example of ReactJS snippet:
Coming Soon…
lead-extractor
umzug-offerte-schweiz
Mine and mine alone!