FormBuilder redirect with URL parameter

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

FormBuilder redirect with URL parameter

Post by rotezecke »

I am using formbuilder (0.8.1.6) with CMSMS 2.2.7 and would like to redirect to a CMSMS page with a URL parameter.
The form is sent to an external action script ("Submit to an arbitrary form action"). That action script is used both by CMSMS and external pages, and it ends with a redirect with URL parameters.
However, FormBuilder has its own settings for Form Submission, which if set to redirect, it will do just that and ignore/overwrite my action scripts redirect (and therefore drop the URL params) OR, if set to "Display Submission Template" i get the redirected page loaded "inline", so the full page would be inside the content block (like an iframe). I cannot (or dont know how to) use sessions, as the action script and CMSMS scope are different. i could use a cookie, but if anyone has another idea how I can pass a variable from my external action script back to CMSMS on form submission, I'd love to hear from you. Thank you.



----------------------------------------------

Cms Version: 2.2.7

Installed Modules:

CGBlog: 1.15.7
CGExtensions: 1.60
CGSimpleSmarty: 2.1.8
CGSmartImage: 1.22.2
CMSContentManager: 1.1.6
CMSMailer: 6.2.14
Captcha: 0.5.5
CmsJobManager: 0.1.2
DesignManager: 1.1.4
FileManager: 1.6.6
FormBuilder: 0.8.1.6
FrontEndUsers: 2.9
JQueryTools: 1.4.0.3
LISE: 1.3.1
LISEaccommodationdb: 1.3.1
LISEinstallersdb: 1.3.1
ModuleManager: 2.1.3
Navigator: 1.0.8
News: 2.51.3
Search: 1.51.4


Config Information:

php_memory_limit:
max_upload_size: 2000000
url_rewriting: mod_rewrite
page_extension: .html
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: Australia/Brisbane
permissive_smarty: true


Php Information:

phpversion: 7.1.16
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 0
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 30
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 8M
upload_max_filesize: 2M
session_save_path: /opt/alt/php71/var/lib/php/session (0700)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On


Performance Information:

allow_browser_cache: Off (False)
browser_cache_expiry: 0
php_opcache: Off (False)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)

Server Information:

Server Software: Apache
Server Api: litespeed
Server Os: Linux 2.6.32-896.16.1.lve1.4.51.el6.x86_64 On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 10.0.34
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable


Permission Information:

tmp: /home/xxx/public_html/tmp (0755)
tmp_cache: /home/xxx/public_html/tmp/cache (0755)
templates_c: /home/xxx/public_html/tmp/templates_c (0755)
modules: /home/xxx/public_html/modules (0755)
uploads: /home/xxx/public_html/uploads (0755)
File Creation Mask (umask): /home/xxx/public_html/tmp/cache (0755)
config_file: 0444

----------------------------------------------
User avatar
rotezecke
Power Poster
Power Poster
Posts: 411
Joined: Fri Apr 18, 2008 9:34 pm
Location: Nimbin, Australia

Re: FormBuilder redirect with URL parameter

Post by rotezecke »

I managed to resolve this by redirecting (from external php action script) to a plain php file

Code: Select all

header("Location: ".$config['root_url']. "/thankyou_txt.php?eid=$sqlEnquiryID");
that file only contains content

Code: Select all

<?php echo "<p>Your ticket number is <strong>#".$_GET['eid']."</strong>.</p>"; ?>
and in Formbuilder (inline form) I selected to display the Submission template which is empty.
The content area is now being replaced with the content of that little php file.
No idea how / why this works :)
Post Reply

Return to “CMSMS Core”