Dynamically include form element data

augusto

New Member
I am wondering what do yo guys mean by "dynamically include form element data using {element_name}", as hinted in the hover balloon over the jump page field of the form settings.

Does this work only in conjunction with the field "append jump url with data" or is there a way to simply use {element_name} in the above field or the actual jump page, to display it or use it in the jump page? I am wondering if there is a way to use this functionality without having to write php code (which I still know very little about). What I am trying to do is replicate the functionality of the "Thanks message when form submitted", but on a separate static content page that I can later track as a google analytics "goal" page.

thanks.
 
It sounds like you just need to "append jump url with data", which will automatically append all of your forms submitted data as query string args.

Or you can append specific ones yourself, by appending placeholders to your jump URL, like &foo={foo}

-- hugh
 
I know very little about php or javascript, but I would imagine I would need to write something in my jump page to read and use the appended data.

I think if the jump page is a joomla page, php will not be interpreted? is that right? Read somewhere that extensions such as jumi allow php code in content pages.

Is there a way however to natively do this without such an extension?

If you can show me a simple example of jump page that prints one of the passed elements using the passing methods you mention above, I can take it from there.

thanks.
 
Not really.

I already modified my joomla template to insert the google analytics tracking code so it appears on every joomla generated page. A "goal page" is something else. It's basically a page that is tracked individually by google as a target page for an action or "goal" you want to measure. For example I have a form the is supposed to schedule a visit/tour of our center. Google analytics needs to differentiate between the form page and the thank you page so it can track how many times the user actually gets to the thank you page as opposed to reach the form page, do nothing and exit. The problem with the regular thank you message provided by the form is that google sees it as the same page, its not different page, so I need for the user to land on a different page after submit so google can see the difference and the path taken. That's why I wanted to duplicate the thank you page on a joomla static content page that I can jump to after the form is submitted.
 
Not sure I understand. Are you talking about the form generated Thanks page? or a jump page?

my issue is that the form generated thanks page currently uses the same url as the form itself, which I need it to be different so the "goals" functionality in google analytics can work.

Then my other issue, probably because of my ignorance of php or JS, is that I don't know how wirite code to parse and reference the data passed along to the jump page, whether that is done by php code or JS code in the jump page or in the form.

if specifying your own JS like you suggest helps me access the data on the jump page or simply change the url of the generated thanks page, I would say go for it. With the latter (change the url) I would not need to re-invent the wheel. I can easily use the generated thanks page to use any element I want with just {element} reference and be done with it.
 
OK. In which case I'm puzzled as to why the form URL is the same as the Thanks page URL.

Is your form somewhere I can see it?

-- hugh
 
well I went in and checked again and realized I have been assuming it was the same, I guess I did not pay much attention the first time.

the thank you page you generate actually comes back with URL

/index.php?option=com_fabrik

The form itself is actually

/component/option,com_fabrik/Itemid,69/

so you are right they are different.


Now I think /index.php?option=com_fabrik is something generic for any form I make right? If I have multiple forms I won't be able to distinguish which one it is which. So my original question/request still holds I think...

thanks.
 
Yes, that is a generic link. The data which would make it unique (like form ID) is in the POST data, not on the query string (GET data).

So yes, it looks like you may need to whip up your own Thank You page.

Unfortunately, tutorials in how to write PHP pages is somewhat outside our freebie support remit.

You might be able to achieve this using JUMI and some very simple PHP lines.

CyberFabrik - would you have a few minutes to take a look at this one? I think a static content page as the Jump page, with form data appended to the URL, and some simple JUMI lines to grab $_REQUEST['element_name'] might be all he needs, although getting the Google JS on the page is another issue. Maybe a call to J!'s addCustomHeadTag() or whatever it's called might do it.

-- hugh
 
Back
Top