Any ideas? I need to have the Id in the email, so I can provide the receiptent a URL which contains the Id in a query string, so they can then view a page with an XSLT macro which provides them information on their forms progress.
I found out that {record.id} can be used in workflows. But what I need is to get current recordID in macro somehow. Contour library adds methods like "GetRecord" to my macros but it takes record id as input. I'm trying to use GetRecord method inside macro that is on the same page as Contour form. My goal is to get some data from *current* record with it but I don't know how to come to current record id in order to pass it to the GetRecord.
I guess it is not possible in macro.
Bottom line, why I need it for, is to do some advanced validation. Form is about subscribing to an event that has limited number of places. Before submit, I want to check if there is enough places left. I wanted to use JQuery for this but I need to pass to JQuery value of an dropdown in current form. I was hoping to get it through Xpath on GetRecord but I don't know how.
Our programmer also tried writing custom workflow but he fails to intercept submit process... form just gets submitted no matter what and visitor ends up on thank you page.
Our project is going to fail without this and we ahve almost exhausted all options.
I don't think your original idea will work, because there won't be any Record created to get data from before the form is submitted. Unless I'm misunderstanding?
If you just need to find the value of a dropdown, couldn't you access it in jQuery using the class on the div that is named based on the field label?
Ex: $('div.contactdepartment div select option:selected').val();
Another idea might be to create a custom field type for your dropdown, and either only show available events or add in your own validation.
Form has multiple pages, so on second page record should be in status "partially submitted" and have it ID. I see it in back office and I can get all records from current page in macro, but just don't know how to select current one with Xpath.
Custom field that shows only available events... we did it (actually with custom prevalues) to filter events that are passed, but to check capacity is a bit trickier as there can be 2 spaces left and somebody would want to apply for 3 places. So I cannot hide it, I need to calculate....
...our last resort is JQuery like you say, but we have many forms ont the site (as much as events and client can add more) so I don't know how exactly to select dropdown I need with single javascript fo all forms. ID of the dropdown is: ContentPlaceHolderDefault_MainContentArea_RenderForm_4_rpFieldsets_rpFields_1_e16a446c_8d60_4a00_ab64_0853903061b5_0
... I'm pretty sure this ID chanegs for every form. That's exactly why I wanted to get current record through Xpath and not through JQuery reading dropdow(s).... OR... we tried to create custom workflow that will do the checking on submit and it does... but after that workflow detects problem it cannot do enything (at least we don't know how to)... visitor is transferred to thank you page no matter what we do in workflow.
P.S. now we're trying to setup custom workflow thatwill play with cookie and change page setting on it (to last page before submit) and then redirect visitor to form page again.
One other thought to retrieve the current record ID. In a multi step form there is a cookie created, called contour_nodeId_formguid (Ex: contour_1653_cc98679b-2ac7-4965-8637-bc1357bb7bb0). It's value is the record id. You could try accessing that to get the record id.
Back to JQuery, you can access the field using it's class - Contour adds the field label as the class on all fields. So if the field is called Event Capacity, you could access using $('.eventcapacity')
If you need some more advanced logic you might want to write a usercontrol instead :)
Curly Bracket Syntax for Record Id
I'm sure I am missing something here, but when my form is submitted I need to send an email which contains the form id.
I can't find documentation for getting this Id using the curly syntax anywhere and have tried the following;
{id] , {record.id} , {recordid} , {Id} , {record.Id} , {recordId}
Any ideas? I need to have the Id in the email, so I can provide the receiptent a URL which contains the Id in a query string, so they can then view a page with an XSLT macro which provides them information on their forms progress.
Any help is super appreciated! (: Lau
Please? I'd happily pay for this support. /Lau
trying to get the same.... record.id in macro so I can write Xpath to select some data. No luck.
If you use the XSLT Transformed Email workflow, you can use $records/id in the XSLT to get the record ID. Not sure about the bracket syntax though...
I found out that {record.id} can be used in workflows. But what I need is to get current recordID in macro somehow. Contour library adds methods like "GetRecord" to my macros but it takes record id as input. I'm trying to use GetRecord method inside macro that is on the same page as Contour form. My goal is to get some data from *current* record with it but I don't know how to come to current record id in order to pass it to the GetRecord.
I guess it is not possible in macro.
Bottom line, why I need it for, is to do some advanced validation. Form is about subscribing to an event that has limited number of places. Before submit, I want to check if there is enough places left. I wanted to use JQuery for this but I need to pass to JQuery value of an dropdown in current form. I was hoping to get it through Xpath on GetRecord but I don't know how.
Our programmer also tried writing custom workflow but he fails to intercept submit process... form just gets submitted no matter what and visitor ends up on thank you page.
Our project is going to fail without this and we ahve almost exhausted all options.
Hi,
I don't think your original idea will work, because there won't be any Record created to get data from before the form is submitted. Unless I'm misunderstanding?
If you just need to find the value of a dropdown, couldn't you access it in jQuery using the class on the div that is named based on the field label?
Ex: $('div.contactdepartment div select option:selected').val();
Another idea might be to create a custom field type for your dropdown, and either only show available events or add in your own validation.
-Tom
Form has multiple pages, so on second page record should be in status "partially submitted" and have it ID. I see it in back office and I can get all records from current page in macro, but just don't know how to select current one with Xpath.
Custom field that shows only available events... we did it (actually with custom prevalues) to filter events that are passed, but to check capacity is a bit trickier as there can be 2 spaces left and somebody would want to apply for 3 places. So I cannot hide it, I need to calculate....
...our last resort is JQuery like you say, but we have many forms ont the site (as much as events and client can add more) so I don't know how exactly to select dropdown I need with single javascript fo all forms. ID of the dropdown is: ContentPlaceHolderDefault_MainContentArea_RenderForm_4_rpFieldsets_rpFields_1_e16a446c_8d60_4a00_ab64_0853903061b5_0
... I'm pretty sure this ID chanegs for every form. That's exactly why I wanted to get current record through Xpath and not through JQuery reading dropdow(s).... OR... we tried to create custom workflow that will do the checking on submit and it does... but after that workflow detects problem it cannot do enything (at least we don't know how to)... visitor is transferred to thank you page no matter what we do in workflow.
P.S. now we're trying to setup custom workflow thatwill play with cookie and change page setting on it (to last page before submit) and then redirect visitor to form page again.
Hi,
One other thought to retrieve the current record ID. In a multi step form there is a cookie created, called contour_nodeId_formguid (Ex: contour_1653_cc98679b-2ac7-4965-8637-bc1357bb7bb0). It's value is the record id. You could try accessing that to get the record id.
Back to JQuery, you can access the field using it's class - Contour adds the field label as the class on all fields. So if the field is called Event Capacity, you could access using $('.eventcapacity')
If you need some more advanced logic you might want to write a usercontrol instead :)
-Tom
is working on a reply...