[SOLVED] recaptha at the bottom of contactform

September 2015 Joomla Template
GK User
Thu Oct 22, 2015 4:01 pm
in the contactform the recaptcha appears as default between the subject and messagefields.
It must be between the messagefield and the send-button.

also, I saw that below the contactform the sidebar-position is repeated. Is this for a reason?
User avatar
Junior Boarder

GK User
Thu Oct 22, 2015 9:49 pm
Solved this by editing templates\tech_news\html\com_contact\contact\default_form.php:
moved this code:
Code: Select all
<?php //Dynamically load any additional fields from plugins. ?>
               <?php foreach ($this->form->getFieldsets() as $fieldset): ?>
               <?php if ($fieldset->name != 'contact'):?>
               <?php $fields = $this->form->getFieldset($fieldset->name);?>
               <?php foreach($fields as $field): ?>
               <?php if ($field->hidden): ?>
               <?php echo $field->input;?>
               <?php else:?>
               <p> <?php echo $field->label; ?>
                    <?php if (!$field->required && $field->type != "Spacer"): ?>
                    <span class="optional"><?php echo JText::_('COM_CONTACT_OPTIONAL');?></span>
                    <?php endif; ?>
                    <?php echo $field->input;?>
               </p>
               <?php endif;?>
               <?php endforeach;?>
               <?php endif ?>
               <?php endforeach;?>

just above this code:
Code: Select all
<p>
                    <button class="button validate" type="submit"><?php echo JText::_('COM_CONTACT_CONTACT_SEND'); ?></button>
                    <input type="hidden" name="option" value="com_contact" />
                    <input type="hidden" name="task" value="contact.submit" />
                    <input type="hidden" name="return" value="<?php echo $this->return_page;?>" />
                    <input type="hidden" name="id" value="<?php echo $this->contact->slug; ?>" />
                    <?php echo JHtml::_( 'form.token' ); ?> </p>
User avatar
Junior Boarder


cron