A simple plugin to print out any get or post params from a form.
Print a single parameter: {exp:parameters:get name="job_id"} or {exp:parameters:post name="job_id"}
Print multiple parameters:
{exp:parameters}
{get_job_id}
{get_foobar}
{/exp:parameters}
Loop through a parameter that is an array:
{exp:parameters}
<ul>
{post_foobar}
<li>{key} {value}</li>
{/post_foobar}
</ul>
{/exp:parameters}
Biggest difference is the only way to get multiple parameters is to use the tag pair. You can add parse=”inwards” to the tag par if you have trouble with the parsing order.
There is a parameter “flatten_arrays=’yes’”, which will take something like $_POST[‘key’] => ‘value’ and return the following: post_key_value. What purpose that might have to someone, I don’t know, but I added it when I was experimenting/having trouble with a form.
Latest version is 1.3
Hi. I am unable to get this plugin to work (Exp 1.6.8 on plugin version 1.2). I get a “Notice: Undefined variable: v in xxxx/www/public_html/admin/plugins/pi.parameters.php on line 66” error.
Test commands used are:
{exp:parameters:get name="screen_name"}
{exp:parameters:get name="test"}
Each was presented with a get query of the following, respectively:
http://localhost/community/members/?screen_name=jsmith
http://localhost/community/members/?screen_name=test
David
I am trying to use this in the forgot password form.
So I put this within the form
<input type="hidden" name="forgot_password_variable" value="true">
{exp:parameters post="forgot_password_variable"}
Then in the specialty template: user messages, I put this code in to detect it
{exp:parameters:get name="forgot_password_variable"}
it does not recognize it at all. From the previous responses, it was not clear how you actually implement this with a form.
Any help is appreciated.
Can’t seem to get his working with the {exp:query}
Eg.
{exp:parameters}
{get_search_input}
{exp:query sql="SELECT *
FROM exp_weblog_titles
WHERE weblog_id = 2
AND title LIKE '{get_search_input}'"}
<ul>
{exp:weblog:entries entry_id="{entry_id}"}
<li>{title}</li>
{/exp:weblog:entries}
</ul>
{/exp:query}
{/exp:parameters}
I’ve tried this:
AND title LIKE '%{get_search_input}%'"}
this:
AND title LIKE '%"{get_search_input}"%'"}
and this:
AND title LIKE '%%{get_search_input}%%'"}
Still can get the nesting to work.
Any ideas?
I am unsure on how this works.
I have a SAEF, that returns to /post/thankyou
{exp:weblog:entry_form
weblog="ajax_form"
return="/post/thankyou"
status="Open"
}
So I put {exp:parameters:post name="title"} within that template, then within the /post/thankyou template I’ve tried the following to get the title value this plugin is suppose to post
{exp:parameters:get name="title"}
and
<?php print $_GET['title']; ?>
neither gets the posted variable title that the plugin posts
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.