Hi,
I created a form and a asset listing to list some details. On the asseet listing, I want to have an "asset name" link to open up a new page to show all the details of the specfic form submission (ie all the questions and answers in the form submission).
<td><a href="???">%asset_name%</a></td>
May I ask which keyword shall I use?
Thanks!
There is no url keyword for a form submission or ability to display the contents on the front end. Your only option is to create the display via an asset list. Greg had a great seggestion in the following topic http://forums.matrix.squiz.net/index.php?showtopic=6474 that would also work in this case for you.
You should be able to show a form submission on the frontend just fine. Just use a URL like: www.example.com?a=123 where 123 is the ID of the form submission. You can generate this URL using the asset_id keyword in the listing of form submissions.
Ah yes, sorry, last time I was trying this I was trying to get front end editing going. You would do this for the url
%asset_name%
Url keywords for the submission won't work, by the way, as a form submission does not get a url.
[quote]Ah yes, sorry, last time I was trying this I was trying to get front end editing going. You would do this for the url
[/quote]%asset_name%
Hi, thanks so much!! The keyword worked! At the moment, the page shows two columns, Question and Answer. As the questions are bit long, the answers are pushed to the far right end of the screen. Is there a way that I can access to change the layout, even just Question in one paragraph and then Answer in the next paragraph?
Thanks again.
Sorry, this is the way Matrix spits it out. If you want to control it more you can either go hard core with css hackery but this will end in tears as the output is in a table. The more elegant solution would be to combine a second listing to display the submission. A paint layout may do it but I haven't tried them on form submissions and I seriously doubt it would work as the submission is not given a url.
Just to get the jump on Nic, you could also use javascript to re-write the content the way you want as well:)
If you use a paint layout, you can customise the frontend look of form submissions. The standard keywords should work, like %question_name_q1% and %question_answer_q1% to print information about question 1.
You will need to look at the form itself to find the correct question numbers.
EDIT: You can also print the IP using the %submission_ip_address% keyword.
Ha! Yes, you could use javascript, I was actually thinking this as I was reading the post. :)
[quote]If you use a paint layout, you can customise the frontend look of form submissions. The standard keywords should work, like %question_name_q1% and %question_answer_q1% to print information about question 1.
You will need to look at the form itself to find the correct question numbers.
EDIT: You can also print the IP using the %submission_ip_address% keyword.[/quote]
Thanks for your help! I used paint layout, but didn't work.
I created a paint layout, used a "Form Submssion Format" applied to form submission. In the content, I used keywords such as
<p>%question_name_109270_q1%<br></p><p><pre>%response_109270_q1%</pre></p>. The paint layout is made live. Then I appied it to "Submissions" folder under the form by using "Lookup settings" . did I miss anything?
Try not using the ID of the form in there. I think it checks for keywords like %question_name_q1% and not %question_name_109270_q1%
Was it just the keywords that didn't work or was it the layout as a whole?
[quote]%response_109270_q1%[/quote]
This one should be %question_response_109270_q1%
[quote]Try not using the ID of the form in there. I think it checks for keywords like %question_name_q1% and not %question_name_109270_q1%[/quote]
The problem with keywords that just use q1 is that if you have sections in your form you will have multiple q1's, in the form the question id's would be idofsection:q1 and the keywords in the form would follow suit, keywords in asset lists also follow the pattern of id_qestionnumber. If there are no sections then the question id would be parentid:qestion number which would actually lend itself to being able to use a simple %question_name_q1%
The paint layout as whole didn't work on 'form submission' type.
I also tried the second asset listing option. Initially, it did work on a simple sorting option. Once I added a few more sorting option, sorted a few times on the first listing, then the link to the second listing didn't match the asset in the first listing. I made sure the asset sorting on two lists are the same by cloning. Can't work out what's wrong.
[quote]If you use a paint layout, you can customise the frontend look of form submissions. The standard keywords should work, like %question_name_q1% and %question_answer_q1% to print information about question 1.
You will need to look at the form itself to find the correct question numbers.
EDIT: You can also print the IP using the %submission_ip_address% keyword.[/quote]
Hi, Greg
I tried paint layout on form submission, which didn't work. Could you please advise it's definitely achievable? If I can get the paint layout working, it will resolve all my problems!!!
The steps I did are:
I created a paint layout, used a "Form Submission Format" applied to form submission type asset. (In the content, I used keywords such as <p>%question_name_109270:q1%<br></p><p><pre>%response_109270:q1%</pre></p>. )The paint layout is made live. Then I applied it to "Submissions" folder under the form by using "Lookup settings" . The paint layout as a whole didn't work, not the issues with the keyword. Did I miss anything or simply paint layout won't work on form submissions?
I think I might know the problem. The design and paint layout are always selected from the current URL. Your current URL is the site's URL, so it is using the site's design and paint layout instead of the form submission's settings. It's a little known feature of Matrix, but one that lets you use asset IDs in URLs and change paint layouts and designs easily.
So try this:
Apply your paint layout to the Custom Form page and then instead of printing the ?a=[submissionid] after the site URL, print it after the Custom Form page's URL.
The URL would be something like: %globals_asset_url:123%?a=%asset_assetid% (where 123 is the asset ID of the form).
Hi, Greg
Yes, it worked!!!! yaaaaaaaaaahoooooooo! You are a life saver!
[quote]
If you use a paint layout, you can customise the frontend look of form submissions. The standard keywords should work, like %question_name_q1% and %question_answer_q1% to print information about question 1.
You will need to look at the form itself to find the correct question numbers.
EDIT: You can also print the IP using the %submission_ip_address% keyword.
[/quote]
Are there Matrix keywords for the fields "Submission Time" and "User Submitting Form" that comes with the regular submission log CSV output?
I don't know if there are any specific keywords for form submission attributes but
%asset_created% %asset_created_by_name%will give you that information. If the user isn't logged in the created by will be the public user though.
[quote]
I don't know if there are any specific keywords for form submission attributes but
%asset_created% %asset_created_by_name%will give you that information. If the user isn't logged in the created by will be the public user though.
[/quote]
Oh awesome that works!
I didn't have much hope of a fix, thanks
