Hi all, maybe this is a simple question, but I can't figure it out or find the answer:
When the user submits a Contour form, I'd like to direct them to a specific anchor - not just direct them to a page. I believe this is done through the Xpath option under "Send to page", but can't work out the syntax at all.
To be specific, I would like to send them to an anchor with the ID #form on the same page as the form.
In regards to the Contour version the exact version is necessary since a lot of things differ if you're using 3.0.6 or 3.0.22 for instance - However in your case it does not matter too much in order for me to try and provide an answer for your question though :)
Weird that there is no description - Usually it says something about "Enter XPATH" so you can enter an XPATH expression to find the page you want the user to see after the form has been submitted.
I don't think it's possible to add a a fragment/id of a page. But you can simply use the "pick node" option to select at page/node for the user to see once the form has been submitted.
Edit: I realised I hadn't said, many thanks for your time on this :)
Yeah it says "Enter XPath" before I click on it - but my problem was, I have no idea how to write the necessary expression.
However if, as you say, it's not possible to specify an ID through XPath I'll simply create a "Thank you" page and pick the relevant node.
I'm surprised there isn't an option to specify a plain URL to send the user to, for the following reasons:
What if the user doesn't fill in all the fields and the form is "below the fold", so when they press submit they're just confronted with the page they were on, and have to scroll down to see the highlighted input errors?
Same with a "thank you" message - when the user presses submit, the page refreshes, but they have to scroll down to see the "thank you" message as the form isn't "above the fold"?
Think we're misunderstanding each other on the part about what the XPATH field can be used for. You can write an XPATH expression to generically find a certain page type for the user to land on. What I though you we're asking is if it's possible to choose a fragment on the landing page as well...if you have the same landing page for several forms, where there are a couple of headers with each their "Thank you" text, which then had a HTML id...
If you don't specify a landing page then the user will see a then contents from the "Message on submit" and the form will dissapear untill the page has been refreshed.
Hope this helps and that I have not misunderstood anything :)
No, you're absolutely right - your answer was spot on to my question. I mistakenly thought the XPath field could be used to specify a fragment but you informed me correctly :)
I then went on to wonder why there was no functionality which allowed me to select an ID, and presented a couple of cases where it would be beneficial. I still wonder this!
But isn't there a "node picker" somewhere where you can click and then select a node from the content tree? Usually there is...I have not played that much around with Contour on v7 yet so have not setup a workflow.
However I guess it should be possible to click the "or pick a node" text? If not then I think it might be a bug if it's not appearing some place else.
Re the node picker: On the menu shown in my screenshot, you can select a content page using "Pick node" under "Send to page", but it doesn't go any deeper - you can't select a specific content section (eg a certain text box or form) on that page.
Screendump below. So when I click "Choose", I'm presented with the right hand side panel, which is a list of my Content pages. Once I click "Home Page", it inserts "Home Page" into the "Send to page" input field.
This means I can't go deeper than "Home Page" to select a content block - eg a specific text area or form.
Go to page anchor when form submitted?
Hi all, maybe this is a simple question, but I can't figure it out or find the answer:
When the user submits a Contour form, I'd like to direct them to a specific anchor - not just direct them to a page. I believe this is done through the Xpath option under "Send to page", but can't work out the syntax at all.
To be specific, I would like to send them to an anchor with the ID #form on the same page as the form.
Would anyone be able to help out please?
Hi Tom and welcome to our :)
Do you have some code you're currently working on? Also what version of Umbraco and Contour are you using?
/Jan
Hi, thanks for the welcome. It's Umbraco 7.1.1 and Contour 3.
I don't have code as my question relates to the highlighted red box in the UI:
What I'm hoping to find out is, what do I need to enter in that box to direct the user to an anchor on the current page?
Many thanks.
Hi Tom
In regards to the Contour version the exact version is necessary since a lot of things differ if you're using 3.0.6 or 3.0.22 for instance - However in your case it does not matter too much in order for me to try and provide an answer for your question though :)
Weird that there is no description - Usually it says something about "Enter XPATH" so you can enter an XPATH expression to find the page you want the user to see after the form has been submitted.
I don't think it's possible to add a a fragment/id of a page. But you can simply use the "pick node" option to select at page/node for the user to see once the form has been submitted.
Hope this helps.
/Jan
Edit: I realised I hadn't said, many thanks for your time on this :)
Yeah it says "Enter XPath" before I click on it - but my problem was, I have no idea how to write the necessary expression.
However if, as you say, it's not possible to specify an ID through XPath I'll simply create a "Thank you" page and pick the relevant node.
I'm surprised there isn't an option to specify a plain URL to send the user to, for the following reasons:
Hi Tom
Think we're misunderstanding each other on the part about what the XPATH field can be used for. You can write an XPATH expression to generically find a certain page type for the user to land on. What I though you we're asking is if it's possible to choose a fragment on the landing page as well...if you have the same landing page for several forms, where there are a couple of headers with each their "Thank you" text, which then had a HTML id...
like
Then it's not possible to specify http://domain.com/page#thanks but you can specify http://domain.com/page. Sorry about the confusion!
If you don't specify a landing page then the user will see a then contents from the "Message on submit" and the form will dissapear untill the page has been refreshed.
Hope this helps and that I have not misunderstood anything :)
/Jan
No, you're absolutely right - your answer was spot on to my question. I mistakenly thought the XPath field could be used to specify a fragment but you informed me correctly :)
I then went on to wonder why there was no functionality which allowed me to select an ID, and presented a couple of cases where it would be beneficial. I still wonder this!
Hi Tom
Ok then :)
But isn't there a "node picker" somewhere where you can click and then select a node from the content tree? Usually there is...I have not played that much around with Contour on v7 yet so have not setup a workflow.
However I guess it should be possible to click the "or pick a node" text? If not then I think it might be a bug if it's not appearing some place else.
/Jan
Re the node picker: On the menu shown in my screenshot, you can select a content page using "Pick node" under "Send to page", but it doesn't go any deeper - you can't select a specific content section (eg a certain text box or form) on that page.
Hi Tom
Ok, could you show a screendump? Sounds like a bug to me...but need to be sure - what exact version of Contour are you using?
/Jan
Contour version is 3.0.19
Screendump below. So when I click "Choose", I'm presented with the right hand side panel, which is a list of my Content pages. Once I click "Home Page", it inserts "Home Page" into the "Send to page" input field.
This means I can't go deeper than "Home Page" to select a content block - eg a specific text area or form.
Hi Tom
Hmmm, that does seem like a bug to me. Do you mind reporting it on the issue tracker if someone has not done it already?
/Jan
Thanks for your time today Jan, have submitted:
http://issues.umbraco.org/issue/CON-548
Hi Tom
You're welcome - Hope it works out.
/Jan
is working on a reply...