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?

TMDesigns
 
mikeyt55 replied on at Permalink Reply
mikeyt55
have you tried just setting the value of the inputs in the form to the ones of the page type? or do u not want to do that?

$page->getAttribute($akHandle) 
Returns the display value of an attribute when passed an attribute key handle.
possibly?

more here -http://www.concrete5.org/documentation/developers/pages/overview/...
TMDesigns replied on at Permalink Reply
TMDesigns
Ideally I would like to you advanced forms and then populate on of the fields with my page attribute.
JohntheFish replied on at Permalink Reply
JohntheFish
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.
RadiantWeb replied on at Permalink Best Answer Reply
RadiantWeb
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
TMDesigns replied on at Permalink Reply
TMDesigns
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?
RadiantWeb replied on at Permalink Reply
RadiantWeb
Make sure you have the latest version.

ChadStrat
TMDesigns replied on at Permalink Reply
TMDesigns
Hmm i don't and it isn't asking me to upgrade
TMDesigns replied on at Permalink Reply
TMDesigns
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.
aaronmarp replied on at Permalink Reply
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.
buurvrouw replied on at Permalink Reply
buurvrouw
If you're on concrete version 8 you can do this with the formibable add-on!
aaronmarp replied on at Permalink Reply
Should have specified that I am on 5.6

On Apr 6, 2017 12:14 AM, "concrete5 Community" <discussions@concretecms.com>
wrote: