Copied to clipboard

Flag this post as spam?

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


  • John C Scott 473 posts 1183 karma points
    Jul 06, 2015 @ 15:49
    John C Scott
    0

    getting posted form value

    If there is a form that posts to a page with a Contour form on it, I thought it would be possible to get the value of a check box on that form saved in a hidden field in contour.

    I used a hidden field and set the default value using the bracket syntax to {@ordered-items} Is this how it should appear? What I am getting in the entries section is just that text "{@ordered-items}" not the value of the checkboxes.

    Hoping pictures will help explain what I mean:

    this is the form with the check box

    enter image description here

    enter image description here

  • Comment author was deleted

    Jul 07, 2015 @ 09:48

    Almost you need to use the syntax [@ordered-items]

  • John C Scott 473 posts 1183 karma points
    Jul 07, 2015 @ 10:06
    John C Scott
    0

    thanks Tim

    that still places [@ordered-items] in the product column - which is a shame

    this site is using Umbraco v6.1.6 & Contour 3.0.21 btw

  • Comment author was deleted

    Jul 07, 2015 @ 10:17

    So it still isn't replacing the [@ordered-items] text? Hmm that should be the correct syntax.

    What happens if you append ?ordered-items=test to the url?

  • Comment author was deleted

    Jul 07, 2015 @ 10:23

    Just did the following test on latest v of Contour and that did the trick

    have a form on my homepage

    and on the test page i have a contour form with a field where the default value is set to [@test]

  • John C Scott 473 posts 1183 karma points
    Jul 07, 2015 @ 10:47
    John C Scott
    0

    Could it be because it is multiple checkboxes?

    I was hoping for something like "tickedvalue1, tickedvalue3, tickedvalue4"

    as you'd get from a request.form["checkboxName"]

    there are really problematic issues with upgrading this site to latest version

    is it the case that this doesn't work in the version I'm using but it would if we went through the update pain?

  • John C Scott 473 posts 1183 karma points
    Jul 07, 2015 @ 10:50
    John C Scott
    0

    btw yes if I append ?ordered-items=test to the url requesting the contour form I do still get the [@ordered-items] in the value for the hidden field

  • Comment author was deleted

    Jul 07, 2015 @ 10:55

    Hmm then it must be an issue with that version of Contour, upgrading to the latest version should fix it, what version of Umbraco are you on?

  • John C Scott 473 posts 1183 karma points
    Jul 07, 2015 @ 10:57
    John C Scott
    0

    this site is using Umbraco v6.1.6 & Contour 3.0.21

  • Comment author was deleted

    Jul 07, 2015 @ 10:59

    You should be able to upgrade Contour to the latest just fine, no need to upgrade Umbraco, upgrading Contour is just a matter of replacing some file.

    Upgrade instructions available here https://our.umbraco.org/projects/umbraco-pro/contour/documentation/Installation/Upgrade

  • John C Scott 473 posts 1183 karma points
    Jul 07, 2015 @ 11:08
    John C Scott
    0

    thanks Tim

    you wouldn't believe how paranoid this particular host is for this customer - arrangements for access are byzantine

    just tried one experiment and changed the name of the input

    and then it works!

    odd

    (it struck me there was something a little bit reserved words about ordered-items)

    btw I inherited and am fixing this sad and broken site

  • Comment author was deleted

    Jul 07, 2015 @ 11:09

    Ah great, glad it's working now!

  • John C Scott 473 posts 1183 karma points
    Jul 07, 2015 @ 11:26
    John C Scott
    1

    well I've found something odd

    it seems to fail whenever there is a hyphen in the input name

    i'll test this on the latest version and raise an issue if that is still the case

  • Comment author was deleted

    Jul 07, 2015 @ 11:28

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft