Go Back   Mosets Community > Mosets Tree 2.1 > Template modifications and custom fields

Reply
 
Thread Tools Display Modes
  #1  
Old 02-09-2010, 04:12 AM
sebastianvangreune sebastianvangreune is offline
Mosets'd
 
Join Date: Sep 2009
Posts: 23
Question Contact form intergration

Hi All. Is there any way to make use of a custom form (RSforms or similiar) when a user clicks the "contact owner" option. I would like to the to be able to fill in some specific information before sending the email. Thanks in advance.
Reply With Quote
  #2  
Old 02-10-2010, 04:48 PM
mamamia mamamia is offline
Mosets'd
 
Join Date: Aug 2008
Posts: 59
Default

Theoretically, what you are asking for should be possible to do, though it will require some customization on both the Mosets end and your form.

In Mosets you'll need to modify the Savant template that builds the contact owner link (Savant2_Plugin_ahrefcontact.php). In there, you'll need to change the href to point to the URL of your form (currently it points to index.php?option=com_mtree&task=contact&link_id='. $link->link_id). When creating the new URL, you'll want to put the variables you want to populate in the form as GET parameters (i.e. index.php?option=com_rsform&formName=myform&listin gName=Foo&listingPhone=5551212).

As it stands now, the Savant template doesn't have access to the Mosets listing info. Hence, you'll need to modify the function signature (plugin( &$link, $attr=null )) to pass whatever you want in so that you can build the URL accordingly. I would suggest an array similar to how $attr works for passing along multiple field variables.

Then in your form you'll need to add logic such that the 'value' attribute of the individual form fields is derived from the key/value pairs stored in the HTTP request object (i.e. using PHP _GET method).

My suggestion would be to start on the form side and insure you can get your form to populate its fields based on GET parameters. You can test this pretty easily by simply going to the form's URL with the concatenated key/value pairs. Then, once all of that is working to move on to the Mosets side of things.

Good luck.

--mamamia
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
hide the email adress with a the contact form anders Template modifications and custom fields 1 11-27-2009 01:06 PM
Email Contact Form from Property Page - NO CONTACT DETAILS fps-property Discussions, Troubleshooting and Problems 2 04-25-2009 03:32 PM
Email Field to use Contact Form not mailto? justme Discussions, Troubleshooting & Problems 4 06-21-2008 09:39 PM


All times are GMT +8. The time now is 05:26 AM.

Copyright © 2005-2010 Mosets Consulting

Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.