Forums

Data passed in the URL

romett 28 Feb, 2012
Hello, I want to fill a check box and out box using the DateTime box. This content should be appended to a URL.

e.g. <!-- w --><a class="postlink" href="http://www.link.com/&ARR=2012-03-01">www.link.com/&ARR=2012-03-01</a><!-- w -->

How can I accomplish this using ChronoForms?

Many thanks and best regards, Roland
GreyHead 28 Feb, 2012
Hi Roland,

Create the form; in the On Submit event either use the ReDirect URL action or a Custom code action to build the URL.

Bob
romett 28 Feb, 2012
Sorry, I do not do it. I create a new form field with the Form Wizard. This is only a DateTime box. Then I go on and take actions under the CURL ReDirect URL and drag it into the box on submit. Here I enter the URL for the target URL. In the Parameter field I enter input_datetime_0.
Then I pull up a submit button and store the form.
The front end then I see no form.
What am I doing wrong?
Best regards, Roland
GreyHead 29 Feb, 2012
Hi Roland,

The data from the URL will be available in the On Load event as $form->data['HN'] and $form->data['ARR'] so you can use those values in any Custom Code or DB Record Loader actions in the On Load event.

Bob
romett 29 Feb, 2012
Hello Bob,

apologize that I'm buggin, but I understand that not everything.

Here are my steps to create a form, which will transmit an arrival and departure days in a hotel on a booking system.

Step 1: I create a new form with the "Form Wizard".

In the preview window I can draw a DateTime box. I call the Field ID: ARR.
Then I draw another DateTime box in the preview window. This gets the DEP Field IDD.

I still prefer a submit button in the preview window. Here I make no change.

Step 2: I change in events, and draw in the On Load Actions from the window a show html.

In the window on Submit, I prefer ReDirect URL and add one there my destination URL.

Step 3: I save the form and look at me with http://www.test.grawebber.de/formtest/formular.

If I fill out this abschicke and it disappears in nirvana.

However, it should end up on that URL (https://mysihot.net/SIHOTWeb/index.htm?HN=418) and transferred according to the data in the arrival and departure windows.

Record your information on DB Loader actions unfortunately I have not understood.

Best regards, Roland
GreyHead 29 Feb, 2012
Hi Roland,

Please drag a Debugger action into the On Submit event, then submit the form and post the debug results here. Note: if you are using the Easy Wizard you may need to switch to the Advanced Wizard to do this; if you want to continue to use the Easy Wizard please make a copy of your form first and add the Debugger action to the copy.

Bob
romett 29 Feb, 2012
Hello Bob, here is the report:

Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /www/htdocs/w00ee169/formtest/administrator/components/com_chronoforms/form_actions/redirect_url/redirect_url.php on line 31
Data Array:

Array
(
[input_datetime_0] => 2012-03-15
[input_datetime_1] => 2012-03-18
[input_submit_2] => Submit
[80c74913e37c0cd99bd94f66b7462da3] => 1
[chronoform] => formular
[event] => submit
[Itemid] => 473
[option] => com_chronoforms
[view] => form
[redirect_url] => https://mysihot.net/SIHOTWeb/index.htm
)

Debug Data

redirect_url
redirect_url_target_url: https://mysihot.net/SIHOTWeb/index.htm?HN=418
Redirect URL: https://mysihot.net/SIHOTWeb/index.htm
GreyHead 29 Feb, 2012
Hi romett,

From the Error message it looks as though you are using the ReDirect URL action without setting any paramters. And you don't seem to have captured the value of HN do you can't add that to the URL.

I'm still very unclear about what this code is trying to do. It looks as though it may be uneccesarily complex from here.

Bob
This topic is locked and no more replies can be posted.