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.
Started 11 years ago by Steve1951 | 4 posts |
-
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,
StevePosted 11 years ago # -
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 # -
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 # -
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 #
Reply
You must log in to post.