Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bill Smith 52 posts 222 karma points
    May 21, 2013 @ 11:55
    Bill Smith
    0

    Populate Contour form field with page field

    I have an Events section in which I would like clients to register for a "named" event.

    Can I take the Event name (a page field) and have this inseredt this into the contour form?

    If so, how?

    Many thanks,

    Bill

  • Fuji Kusaka 2203 posts 4220 karma points
    May 21, 2013 @ 12:03
    Fuji Kusaka
    0

    Yes you Could make use of QueryString  then in contour have a hidden field with default value [@yourQueryString]

  • Bill Smith 52 posts 222 karma points
    May 21, 2013 @ 12:42
    Bill Smith
    0

    I haven't tried that!

    I have tried #pageHeading, which is the alias of the event name but that just renders as: "pageHeading" !!!

    I'll try @pageHeading (from a queryString)

    Thanks

  • Fuji Kusaka 2203 posts 4220 karma points
    May 21, 2013 @ 12:47
    Fuji Kusaka
    0

    Try something like this

     <a  href="/your-url/[email protected]">...</a>

    Then in your contour form you can get a HiddenField with Default Value

    [@Title]
  • Comment author was deleted

    May 21, 2013 @ 15:09

    Just set the caption to [#propertyAlias] that should do the trick

  • Bill Smith 52 posts 222 karma points
    May 21, 2013 @ 15:43
    Bill Smith
    0

    Tim, I've done that: Created a hidden field set the default value to #pageHeading, returned  "pageHeading", then I set the caption to the #pageHeading with the same result.

    I've even tried enclosing them in sqaure brackets: [#pageHeading]. Still with the same result.

    Any further sugestions?

  • Comment author was deleted

    May 21, 2013 @ 16:51

    Ok can you tell me umbraco version and if you are using usercontrol or razor macro

    Thanks :)

  • Bill Smith 52 posts 222 karma points
    May 22, 2013 @ 15:40
    Bill Smith
    0

    Umbraco version 4.11, how would I know if Contour is usercontrol or razor macro?

  • Comment author was deleted

    May 22, 2013 @ 15:58

    Check where you inserted the macro what alias the macro has :)

  • Bill Smith 52 posts 222 karma points
    May 22, 2013 @ 21:19
    Bill Smith
    0

    Will do.

  • Bill Smith 52 posts 222 karma points
    May 24, 2013 @ 16:08
    Bill Smith
    0

    Tim, it's a Razor macro. Would that make a difference?

  • Comment author was deleted

    May 27, 2013 @ 09:51

    Yeah make sure you are running the latest Contour version since you might be running an older version where this wasn't possible yet

    To upgrade check http://our.umbraco.org/projects/umbraco-pro/contour/documentation/Installation/Upgrade

  • Bill Smith 52 posts 222 karma points
    May 27, 2013 @ 13:00
    Bill Smith
    0

    The version I am using is 3.0.9. Does this support page field inclusion?

  • Comment author was deleted

    Jun 03, 2013 @ 09:21

    Think you'll need a more recent version 

  • Osman Coskun 170 posts 404 karma points
    Dec 02, 2013 @ 00:06
    Osman Coskun
    0

    Hi Tim, 

    I have Umbraco Contour version 3.0.17 and use razor macro to add form to template. I can populate contour form fields with custom document properties(e.g. shortTitle etc) using [#propertyAlias] notation. I need to assign the id of current document to a hidden field. When i try [#id] i can not get document id. 

    Any advice?

    TIA

    Update : I found the syntax to pass query string to contour : [@pid] . The trick is parameter name must be at least 2 characters long. 

    Plus, to insert document properties  [#pageID] syntax is available. 

     

Please Sign in or register to post replies

Write your reply to:

Draft