reCaptcha position

Support desk for Multipurpose Quark Theme
GK User
Tue Nov 24, 2015 12:56 pm
Hi,
I would change the Captcha position in the contact form. I have read the following entry but doesn't work for me.
https://www.gavick.com/forums/photo-joo ... on#p244963

Provisional URL: http://146.185.19.58/~restaur1/contacto

Thank you in advance.
User avatar
Senior Boarder

GK User
Tue Nov 24, 2015 5:19 pm
What changes did you do.
User avatar
Moderator

GK User
Wed Nov 25, 2015 4:17 pm
The captcha is now before the textarea of the message, I would put it later, between message and send button.

Thank you.
User avatar
Senior Boarder

GK User
Thu Nov 26, 2015 5:13 pm
Then you need to do exactly what is described in the linked post - move part of the code that generates additional fields under the code that generates the message field.
User avatar
Moderator

GK User
Fri Nov 27, 2015 11:50 am
Hi Cyberek,
sorry, but doesn't work for me. No one line down, nor 2, nor 3.... I get always PHP errors.
"Parse error: syntax error, unexpected 'endif' (T_ENDIF) in /home/restaur1/public_html/templates/gk_quark/html/com_contact/contact/default_form.php on line 49"
User avatar
Senior Boarder

GK User
Fri Nov 27, 2015 5:49 pm
Because probably you are doing it wrong - you can't place this code anywhere.
Original code looks this way:
Code: Select all
       <p class="contact-name"><?php echo $this->form->getLabel('contact_name'); ?> <?php echo $this->form->getInput('contact_name'); ?> </p>
       <p class="contact-email"><?php echo $this->form->getLabel('contact_email'); ?> <?php echo $this->form->getInput('contact_email'); ?></p>
       <p><?php echo $this->form->getLabel('contact_subject'); ?> <?php echo $this->form->getInput('contact_subject'); ?></p>
       <?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;?>
       <p><?php echo $this->form->getLabel('contact_message'); ?> <?php echo $this->form->getInput('contact_message'); ?></p>
       <p>
            <?php    if ($this->params->get('show_email_copy')){ ?>
            <?php echo $this->form->getLabel('contact_email_copy'); ?> <?php echo $this->form->getInput('contact_email_copy'); ?>
            <?php    } ?>
       </p>

(I have added some indentions to make it more readable).
Now if you want to move recaptcha under the message box, the code should look this way:
Code: Select all
       <p class="contact-name"><?php echo $this->form->getLabel('contact_name'); ?> <?php echo $this->form->getInput('contact_name'); ?> </p>
       <p class="contact-email"><?php echo $this->form->getLabel('contact_email'); ?> <?php echo $this->form->getInput('contact_email'); ?></p>
       <p><?php echo $this->form->getLabel('contact_subject'); ?> <?php echo $this->form->getInput('contact_subject'); ?></p>
       <p><?php echo $this->form->getLabel('contact_message'); ?> <?php echo $this->form->getInput('contact_message'); ?></p>
       <?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;?>
       <p>
            <?php    if ($this->params->get('show_email_copy')){ ?>
            <?php echo $this->form->getLabel('contact_email_copy'); ?> <?php echo $this->form->getInput('contact_email_copy'); ?>
            <?php    } ?>
       </p>
User avatar
Moderator

GK User
Sun Nov 29, 2015 9:04 pm
Ok. Thank you very much Cyberek.
Now is all right.
Problem solved.
User avatar
Senior Boarder

GK User
Mon Nov 30, 2015 6:56 pm
If you have any additional questions regarding this topic, please let me know.
User avatar
Moderator


cron