|
#1
|
|||
|
|||
|
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.
|
|
#2
|
|||
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |