Page 1 of 1

Captcha layout issue

Posted: 06 Jun 2024, 21:57
by SSK
Hi,

I used Phoca Guestbook version 4.0.3 with the EasyCalc captcha and it looks like this:
https://imgur.com/a/lOevYMH

Code: Select all

<div class="controls input-prepend input-append input-group">
			<b>Solve the equation: </b>10 plus 7 equals  
      <input
        type="text"
        name="jform[captcha]"
        id="jform_guestbook_captcha"
        value=""
        class="form-control input-sm required"  aria-describedby="jform_guestbook_captcha-desc" required>
        <br/>
</div>
However, after upgrading to version 5.0.0 (still on Joomla 4) the text and the input field are reversed in order:
https://imgur.com/1FQIZke

Code: Select all

<div class="controls input-group">
       <input type="text" name="jform[captcha]" id="jform_guestbook_captcha" value="" class="form-control input-sm required" aria-describedby="jform_guestbook_captcha-desc" required="">
</div>
<div><b>Solve the equation: </b>13 plus 8 equals <br>
</div>
I do notice that the challenge (Solve the equation...) is in a separate DIV now.
Which file do I have to edit to change the order (description/challenge first, input field second)?
I haven't found it yet in the template files, neither does it seem t be a css stylesheet issue.

Any help is greatly appreciated!

Re: Captcha layout issue

Posted: 09 Jun 2024, 16:19
by Jan
Hi, testing now, for me, it looks OK:

Image

Try to check your template CSS if the form is correctly styled :idea:

Jan

Re: Captcha layout issue

Posted: 14 Jun 2024, 11:58
by SSK
I found the solution: I have to change te file
\components\com_phocaguestbook\models\fields\phocacaptcha.php
line 96, which was:

Code: Select all

$retval =  parent::getInput() . '</div><div>'.$captcha['challenge'] . '<br/>' ;
into:

Code: Select all

$retval =  $captcha['challenge'] . ' ' . parent::getInput() ;
and remember that when I update to a new version...

Re: Captcha layout issue

Posted: 18 Jun 2024, 02:32
by Jan
Ok, thank you for the info.