View Single Post
  #1  
Old 11-22-2012, 10:33 PM
dremay dremay is offline
Mosets'd
 
Join Date: May 2011
Location: Leicestershire, UK
Posts: 7
Property contact form redirects to Login page

Hi,

I have an issue - when a user contacts an agent they are redirected to the login page & no email is sent.

I'm including the contact owner in the following way

PHP Code:
<?php if ($hotproperty->getCfg('show_enquiryform')) : ?>
                <h2 id="SendAnEmailtoOwner">Contact the Owner</h2>
                <?php $this->agent $this->row->Agent?>
                   <?php echo $this->loadTemplate('contact'); ?>
                <?php endif; ?>
My property_contact.php has the following:
HTML Code:
<?php $hotproperty =& MosetsApplication::getInstance('hotproperty');?>

<?php MosetsHTML::_('behavior.formvalidation'); 

$action ='';
$action = JURI::root( false );
$action =  'index.php?option=com_hotproperty&amp;task=sendenquiry&amp;id='.$this->row->id.'&amp;Itemid='.JRequest::getVar('id');
?>
<!-- component fws -->
<form method="post" id="contactowner" action="<?php echo $action; ?>" class="form-validate contact-form">
	
		<input class="text" type="text" title="Your name" value="Your name" name="name">
		<input class="text" type="text" title="Tel." value="Tel." name="contactnumber">
		<input class="text" type="text" title="Email" value="Email" name="email">
		<textarea rows="5" cols="50" title="Message" name="enquiry">Message</textarea>
		<input type="submit" class="btn-send" title="Send" value="Send">
			
	<!--<input type="hidden" name="option" value="com_hotproperty" />
	<input type="hidden" name="controller" value="properties" />
	<input type="hidden" name="task" value="sendenquiry" />-->
	<?php echo MosetsHTML::_('form.token'); ?>
        
        
</form>
I'm running J! 1.5.26 + latest HP.
I'm also running AEC = the owner is associated with a valid plan, etc.

Any suggestions?

Thanks,
Eddie