This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 2

How to create "elegant" URLs


  1. benr
    Member

    I want to use a single form, exactly as MachForm creates them (i.e. not as an iframe or php include on another page), but I don't want users to see the "forms/view.php?id=2" part of the URL (mainly because I don't want inquisitive users finding the admin login page at all).

    I can easily create a super simple php include page (index.php) at "http://mydomain.com/order" but that messes with the CSS, so the layout would need complex re-creation.

    What's the best way to get the URL I want, with the full CSS layout of MachForm?

    Posted 15 years ago #
  2. yuniar

    Hello Ben,

    Actually you can use the advanced embed code to do so.
    Simply create an empty PHP page, let say http://www.example.com/order.php

    And then insert the advanced embed code there.
    Your form should be working out of the box. It won't messes MachForm's CSS.


    MachForm Founder

    Posted 15 years ago #
  3. benr
    Member

    That's what I thought would work, but it doesn't. Have sent a support email with more details.

    Posted 15 years ago #
  4. yuniar

    Got your support email and replied.
    I'm posting the solution here so that it would benefit other people.

    Ok, so basically when you are using the Standard or Advanced Embed Code, your form container, header and footer are being stripped. This is on purpose so that the form could integrate nicely with your current page.

    If you are using the advanced embed code and want the form to have the same look as when you click "View Form", then you need to modify the CSS code of your form.

    Search for "integrated" section on your CSS code:

    /** Integrated Form **/
    .integrated *{
    	font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
    	color: #000;
    }
    
    .integrated #top, .integrated #bottom, .integrated h1{
    	display: none;
    }
    
    .integrated #form_container{
        border: none;
    	width: 99%;
    	background: none;
    }
    
    .integrated #footer{
    	text-align: left;
    	padding-left: 10px;
    	width: 99%;
    }
    
    .integrated #footer.success{
    	text-align: center;
    }
    
    .integrated form.appnitro
    {
    	margin:0px 0px 0;
    
    }
    
    .integrated form .section_break h3
    {
    	border: none !important;
    }
    
    .integrated #error_message h3
    {
    	border: none !important;
    
    }

    remove the whole code above.
    And then search for this code at the beginning of your CSS:

    #main_body
    {
    	background:#fffff;
    	font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
    	font-size:small;
    	margin:8px 0 16px;
    	text-align:center;
    }

    change it to become:

    #main_body
    {
    	background:#fffff;
    	font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
    	font-size:small;
    	padding:20px; /* <== here is the change */
    	text-align:center;
    }

    that should make your integrated form to have the same style/look as your normal standalone form.


    MachForm Founder

    Posted 15 years ago #
  5. green
    Member

    i am having this problem. tried all the above but the page is extremely spaced out.

    Posted 15 years ago #
  6. yuniar

    green -- can you post an URL so I can check?
    Or send mail to: customer.service [at] appnitro.com


    MachForm Founder

    Posted 15 years ago #
  7. ai
    Member

    I know this is an old topic, but I just followed the instructions and they worked great!

    However, my "success page" doesn't look good (formatting is off)... is there a way to change that too?

    Thanks!

    Posted 13 years ago #

RSS feed for this topic

Reply