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

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 3

Method to pass data to forms other than URL parameters.


  1. Steve1951
    Member

    Is there a method to pass data to forms other than URL parameters? On some long forms I pass a lot of data and the URL becomes very long. I normally use PHP Embed Code so I was hoping I could set some type of global variable (or array) similiar to $_POST instead of $_GET.

    If this functionality is not available, could you direct me to the file where the URL parameters are parsed so I can modify the file to use an array instead of the URL parameters.

    Thanks,
    Steve

    Posted 11 years ago #
  2. yuniar

    I'm afraid you will need to modify the code and change the GET into POST. You can search into "includes/view-functions.php" file.
    Simply search for all $_GET variables there and you'll find it.


    MachForm Founder

    Posted 11 years ago #
  3. Steve1951
    Member

    Thanks for your reply. Considering $_GET is used 93 times in the view-functions.php file, perhaps I should just tolerate long URL links or look for a different method to pass data.

    Posted 11 years ago #
  4. Steve1951
    Member

    I found a method to accomplish what I need without making any modifications to any MachForm files. If I want to pass data to a form without adding the information to the URL here is what I do.

    Within the same PHP file where I embed the MachForm code I add the following before the embedded MachForm code:

    if (!isset($_GET['element_5'])) {
      $_GET['element_5'] = $meeting_event;
    }

    If the data is not already in the $_GET array, then I add it to the array. With this method, the data is not displayed in the URL.

    Posted 11 years ago #

RSS feed for this topic

Reply