Captcha layout issue

Phoca Guestbook - creating guestbooks in Joomla! CMS
SSK
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Jun 2024, 06:58

Captcha layout issue

Post 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!
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Captcha layout issue

Post 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
If you find Phoca extensions useful, please support the project
SSK
Phoca Newbie
Phoca Newbie
Posts: 2
Joined: 05 Jun 2024, 06:58

Re: Captcha layout issue

Post 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...
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48386
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Captcha layout issue

Post by Jan »

Ok, thank you for the info.
If you find Phoca extensions useful, please support the project
Post Reply