Pulling Page Attributes into a Form
Permalink
Hi,
I have a load of page attributes on a page type. I would also like to place a form on the page and have some of the values of the attributes pulled into that form.
Does anyone know a addon that might do this or seen anything like this?
I could hard code the form but there must be an easier way?
I have a load of page attributes on a page type. I would also like to place a form on the page and have some of the values of the attributes pulled into that form.
Does anyone know a addon that might do this or seen anything like this?
I could hard code the form but there must be an easier way?
Ideally I would like to you advanced forms and then populate on of the fields with my page attribute.
A solution I have in mind for this kind of requirement is to evaluate Magic Data expressions within a form default value.
The code would be simply wrapping the generation of the default value in a call to a Magic Data evaluation helper. That way any Magic Data expression within the default text would be evaluated when the value is shown on the form. Default values could then be populated on pretty much anything, including user, page or product attributes and combinations, chains and manipulations of them.
For text or numeric values the code involved is absolutely trivial. For selections it would be a little more involved, but still only a few lines.
To make this happen, I need the developer of a forms package to get involved and invest an hour or two on the integration.
If any end-user of a forms package wants to have ago at this, I can offer advice. All you need is a forms package that supports defining default values as text.
The code would be simply wrapping the generation of the default value in a call to a Magic Data evaluation helper. That way any Magic Data expression within the default text would be evaluated when the value is shown on the form. Default values could then be populated on pretty much anything, including user, page or product attributes and combinations, chains and manipulations of them.
For text or numeric values the code involved is absolutely trivial. For selections it would be a little more involved, but still only a few lines.
To make this happen, I need the developer of a forms package to get involved and invest an hour or two on the integration.
If any end-user of a forms package wants to have ago at this, I can offer advice. All you need is a forms package that supports defining default values as text.
ProForms has a nice "hidden_page_attribute" question available. you just tell it what request var = cID to pull and what attribute to handle to get.
Also has a hidden_user_attribute as well.
What's particularly nice about these is that you can utilize the values of these in an autoresponder question type by simply referencing those hidden question handles with [[hidden_question_name]] within your autoresponder emails.
ChadStrat
Also has a hidden_user_attribute as well.
What's particularly nice about these is that you can utilize the values of these in an autoresponder question type by simply referencing those hidden question handles with [[hidden_question_name]] within your autoresponder emails.
ChadStrat
thanks ChadStrat,
I had a copy of proforms that I have never used so installed it. Seems fine and I think will do the job.
One thing though it that when i click on the editor button it just show the editor then skips of to a 404 page.
Any ideas?
I had a copy of proforms that I have never used so installed it. Seems fine and I think will do the job.
One thing though it that when i click on the editor button it just show the editor then skips of to a 404 page.
Any ideas?
Make sure you have the latest version.
ChadStrat
ChadStrat
Hmm i don't and it isn't asking me to upgrade
I have now had a chance to look at this and it isn't going to work as i want to me able to pass a attribute from a page type not a certain page. Basically I want to pass the package title and a price but these are different on every page.
Has anyone had any luck with this? I too am using Advanced Forms and want to pass a page attribute to the email that is sent from the form on my page.
If you're on concrete version 8 you can do this with the formibable add-on!
Should have specified that I am on 5.6
On Apr 6, 2017 12:14 AM, "concrete5 Community" <discussions@concretecms.com>
wrote:
On Apr 6, 2017 12:14 AM, "concrete5 Community" <discussions@concretecms.com>
wrote:
more here -http://www.concrete5.org/documentation/developers/pages/overview/...