Add prevalue to drop down from current page document
Hi,
I have an Event page that uses a document type called Event, which has fields such as event name , price, description
I've added a contour booking form to the event page for users to fill in their details. I would like the form to grab values from the current page that the form sites on, ie event name and price, basically details that are not set in the contour form itself.
I've tried many things, such as creating a PreValue Source and applying it to a dropdown (i dont mind if the drop down has the single value for price). I set the prevalue to:
I found a workaround, where I put the event price in a session variable, and then I create a hidden variable in the contour form with a default value of the sesion variable price.
My end aim is to create a query string of the form values and details of the booking and send it to paypal you see.
I've made up a screenshot to illustrate what I'm trying to do, my workaround is fine, but I'm sure there will be other people trying to do something similar in the future, so would be ace if contour could do this automatically.
Add prevalue to drop down from current page document
Hi,
I have an Event page that uses a document type called Event, which has fields such as event name , price, description
I've added a contour booking form to the event page for users to fill in their details. I would like the form to grab values from the current page that the form sites on, ie event name and price, basically details that are not set in the contour form itself.
I've tried many things, such as creating a PreValue Source and applying it to a dropdown (i dont mind if the drop down has the single value for price). I set the prevalue to:
Root node xpath: $currentPage/price ( i've tried all sorts ie. @id, @nodeName, ./price
Use current page as root: ticked
but nothing has worked for me. There doesn't seem to be any examples of using the Xpath option on the PreValue tab.
Any help would be really appreciated thanks.
Tim
Comment author was deleted
Hey Tim,
Well the prevalue source will list the node names.
If you tick the use current page as root it will list all subpages.
I found a workaround, where I put the event price in a session variable, and then I create a hidden variable in the contour form with a default value of the sesion variable price.
My end aim is to create a query string of the form values and details of the booking and send it to paypal you see.
I've made up a screenshot to illustrate what I'm trying to do, my workaround is fine, but I'm sure there will be other people trying to do something similar in the future, so would be ace if contour could do this automatically.
is working on a reply...