Several clients have asked us recently about how Dynamic Forms and Dynamic Registration can accept silent posts and I wanted to create a quick blog post that highlights how to do this. First... The ability to accept silent posts (which is what this blog post is referring to) is separate from the features within Dynamic Forms/Dynamic Registration completion events that SEND HTTP Posts. You could technically use Dynamic Forms to send a silent post via Dynamic Forms to another Dynamic Forms but in general this blog post covers how to use these modules to 'Receive' silent HTTP Posts.
First - Why use or integrate receiving a silent post into Dynamic Forms and Dynamic Registration? Simple! You can take advantage of all of the features including the ability to submit form data, ability to register a user within DNN, ability to utilize all form completion events within the modules etc... So you could technically use PHP/Joomla/Flash or Action SCript, or maybe another DNN Site that might be sending an HTTP Form Post to your module and you can then utilize all of the features of Dynamic Forms and Dynamic Registration as if the user went to the site and typed in all of those fields directly.
Lets start with the very basics and most important steps:
1. To post to either a Dynamic Forms instance or Dynamic Registration instance you need to include a parameter in the URL or in the post for SPost=True. So at the very end of your URL you should include ?SPost=True or make sure you send the SPost variable as one of the form post options with the value of True.
2. Both Dynamic Forms and Dynamic Registration accept form posts once the SPost variable is passed with a value of true and ALSO based on the short field name of each field on your form. So in other words if you have a short field name of 'FName' for the field 'First Name' on your form, then you should be passing a form post of FName to the URL.
3. As with other posts to / from somewhere you must keep in mind that if the module is receiving a silent post it shouldn't be behind a login. This is a common mistake when integrating components because whatever is sending the post out is probably not authenticated on your DotNetNuke site.
4. The silent post will be treated just as if the user came and submitted these details to the form. What does this mean? Well most importantly this means that if you are not passing a field that is required the form would be submitted. So this applies to any validation you are using such as standard validation or SQL Validation etc... Things to check! Make sure you disable CAPTCHA for the form when using the silent post feature. You could do this by either creating a new forms / registration instance or you could do this by using the question events feature to show/hide the CAPTCHA fields. Basically you could create a hidden field called SPost and when that field is set to True you could HIDE CAPTCHA. This way the field would be hidden for the silent posts. Just make sure that the SPost hidden field has a sort order that is smaller then the CAPTCHA field.
Its that simple! Really, you should be up and running quickly. You can test this by sending to/from another Dynamic Forms instance if you would like. You can test this using a demonstration we are working on here:
http://www.datasprings.com/products/dnn-modules/Dynamic-Forms/Dynamic-Forms-demo-33-silent-post-demonstration
We also have some other forums for showing how Opt In Email can accept silent posts here:
http://www.datasprings.com/products/product-forums/aft/7619
I did another blog post on this topic but wasn't as clear at the time... You can still refer to it here:
http://www.datasprings.com/news/blog/postid/9
Thanks... I would be interested in hearing any feedback on this topic!
-Chad