I'm running Chronoforms v4, Sobipro version 1.6 and Joomla 2.5.4.
I am using the chronoforms plugin to display a form on a sobipro page -- with help, I finally got it working.
The email address is in the Sobi database and when it renders the page, the email address is being put in a hidden field. I know it is not hidden from spambots but that can be dealt with later.
I'm wondering if when the chronoform is submitted if I can use a little javascript to fetch the email address from the hidden field?
I'm still getting used to V4 but I think I remember in earlier versions that js was possible.
I am using the chronoforms plugin to display a form on a sobipro page -- with help, I finally got it working.
The email address is in the Sobi database and when it renders the page, the email address is being put in a hidden field. I know it is not hidden from spambots but that can be dealt with later.
I'm wondering if when the chronoform is submitted if I can use a little javascript to fetch the email address from the hidden field?
I'm still getting used to V4 but I think I remember in earlier versions that js was possible.
Hi hcharris,
Yes I imagine that can be done. Is the hidden field inside the ChronoForm or somewhere else on the page?
Bob
Yes I imagine that can be done. Is the hidden field inside the ChronoForm or somewhere else on the page?
Bob
Thank's for the reply GrayHead! It's somewhere else on the page.
I'm trying to think up all the possibilities for this:
One way would be to continue to load the email address from sobi when the page is loaded. If I go this way I have the problem of email cloaking. I don't want to expose the email addresses but I could probably do some kind of dynamic modification to hide it and then reverse it when I pull it in. For example: [email]myemail@domain.com[/email] could be converted to myemail_*_domain.com and then reversed by chronoforms.
The other way could be to load an id of the record and then get the id into chronoforms and read the database for the email address in chronoforms. I would have to determine if/how I can read a sobi record because they store the data in a unique way but this way seems to have a number of advantages. I have your book and I'm going to have to rely on some of those recipes for the coding.
I have been really determined to use chronoforms on this component because of its capability and flexibility. There are some commercial products to do this in sobi but they are not flexible and will break the look and feel of the website (I use chronoforms other places). Sobi has promised a plugin for their component at sometime in the future but it too will be limited to just a contact form.
There is quite a bit of conversation on the sobi board about this need but one of the approaches above would be far more elegant.
Thanks again for the response.
Carter
I'm trying to think up all the possibilities for this:
One way would be to continue to load the email address from sobi when the page is loaded. If I go this way I have the problem of email cloaking. I don't want to expose the email addresses but I could probably do some kind of dynamic modification to hide it and then reverse it when I pull it in. For example: [email]myemail@domain.com[/email] could be converted to myemail_*_domain.com and then reversed by chronoforms.
The other way could be to load an id of the record and then get the id into chronoforms and read the database for the email address in chronoforms. I would have to determine if/how I can read a sobi record because they store the data in a unique way but this way seems to have a number of advantages. I have your book and I'm going to have to rely on some of those recipes for the coding.
I have been really determined to use chronoforms on this component because of its capability and flexibility. There are some commercial products to do this in sobi but they are not flexible and will break the look and feel of the website (I use chronoforms other places). Sobi has promised a plugin for their component at sometime in the future but it too will be limited to just a contact form.
There is quite a bit of conversation on the sobi board about this need but one of the approaches above would be far more elegant.
Thanks again for the response.
Carter
Hi Carter,
If it's somewhere else on the page then I'd add an empty hidden input to the ChronoForm and a JavaScript snippet to read the value from the other hidden input and set the value of the ChronoForms one. Provided they both have distinct ids this is very simple to do.
If you can change the email address you could just base64_encode() it before loading.
Bob
If it's somewhere else on the page then I'd add an empty hidden input to the ChronoForm and a JavaScript snippet to read the value from the other hidden input and set the value of the ChronoForms one. Provided they both have distinct ids this is very simple to do.
If you can change the email address you could just base64_encode() it before loading.
Bob
Bob, I am following up on this so all the people who want to use Chronoforms on Sobipro pages will know there is a solution. It was important to me for a number of reasons but mostly because Chronoforms is such a great tool and the only thing Sobipro could offer was a "contact form" at some point in the future. I wanted to have the flexibility of defining my forms rather than limiting myself to a contact form. With this solution, I have the a good "directory" component and a great form manager.
I was not able to do it using base64 encoding so I am obfuscating the email address . Sobipro is using XSL and I just don't have the talent to figure out base64 in that environment. So I decided to try to obfuscate the email address to protect it while the page was available. To do this, I used rereplacer (joomla component) and modified the "@" with a regular expression. I'll probably have to be careful to make the expression discriminatory enough so it doesn't screw up email addresses in other places.
Then I added a javascript in Chronoforms to pluck the email address from the hidden element on the Sobipro side of the document, reverse the obfuscation, and poke it into a hidden field on the Chronoforms side of the document. I then use the name of the hidden field to send the mail using a Chronoforms dynamic field. Pretty cool.
I've tested it in Firefox and IE and so far everything looks good.
Overall the solution was pretty much like we discussed but I had to make some compromises. I hope to improve on this solution and make it even better.
Thank you for discussing the solution and pointing me in the right direction. I would be happy to share what I have and that includes documenting the solution for your readers.
I was not able to do it using base64 encoding so I am obfuscating the email address . Sobipro is using XSL and I just don't have the talent to figure out base64 in that environment. So I decided to try to obfuscate the email address to protect it while the page was available. To do this, I used rereplacer (joomla component) and modified the "@" with a regular expression. I'll probably have to be careful to make the expression discriminatory enough so it doesn't screw up email addresses in other places.
Then I added a javascript in Chronoforms to pluck the email address from the hidden element on the Sobipro side of the document, reverse the obfuscation, and poke it into a hidden field on the Chronoforms side of the document. I then use the name of the hidden field to send the mail using a Chronoforms dynamic field. Pretty cool.
I've tested it in Firefox and IE and so far everything looks good.
Overall the solution was pretty much like we discussed but I had to make some compromises. I hope to improve on this solution and make it even better.
Thank you for discussing the solution and pointing me in the right direction. I would be happy to share what I have and that includes documenting the solution for your readers.
Hi hcharris,
Great, well done. Sounds like a good pragmatic solution :-) Thanks for posting the update.
Bob
Great, well done. Sounds like a good pragmatic solution :-) Thanks for posting the update.
Bob
GrayHead: I have written up this process. You can download a copy here: [url deleted Bob]. Please feel free to change it as you see fit and include it in your tutorials. Please delete this post after you get the file. Thanks for all your help.
Hi lcharris,
I re-formatted and made some small changes to the JavaScript - it's now available here
Bob
I re-formatted and made some small changes to the JavaScript - it's now available here
Bob
I know this post is quite old but I would like to display a Chronoform V4 in SobiPro 1.1 in Joomla 3.1.
I studied your/hcharris doc but as it is very concise and the images ar quite blurred unfortunately I don‘t unterstand the instructions.
As I don‘t manage to extend the default form in Sobi (I am not familiar with xsl-files) and I dont manage to integrate a Chronoform into Sobi I am quite stuck :-(
I am looking for somebody out there who could help me build this function or set it up for me - of course I will pay for the work!
Any help and any indications of Sobi/Chronoforms-Experts are highly appriciated -
Thank you!
I studied your/hcharris doc but as it is very concise and the images ar quite blurred unfortunately I don‘t unterstand the instructions.
As I don‘t manage to extend the default form in Sobi (I am not familiar with xsl-files) and I dont manage to integrate a Chronoform into Sobi I am quite stuck :-(
I am looking for somebody out there who could help me build this function or set it up for me - of course I will pay for the work!
Any help and any indications of Sobi/Chronoforms-Experts are highly appriciated -
Thank you!
This topic is locked and no more replies can be posted.