Page 1 of 1
User and email should be read only
Posted: 15 Sep 2015, 01:49
by gtrennert
Hello
I'm trying Phoca Guest Book and its nice
On my site, the guest book is only for unregistered users
But I don't want that they can modify the username or the email address that are filled in automatically
Did I miss some options ?
Thanks
Re: User and email should be read only
Posted: 17 Sep 2015, 23:07
by Jan
Hi, hmmm, in such case you need to customize the output, add e.g. read only attribute to the field inputs.
I am not on my PC now, so I cannot test it but maybe it is enough when you add the read only parameter to the XML where the fields are defined:
components\com_phocaguestbook\models\forms\guestbook.xml
(email, username)
add readonly parameter there:
readonly="true" or
readonly="1"
or readonly
Jan
Re: User and email should be read only
Posted: 19 Sep 2015, 06:17
by gtrennert
Hello
Thanks - I'm not sure to understand :
I modified the xml like this :
Code: Select all
<field name="email" type="phocaemail" class="input-xlarge" label="COM_PHOCAGUESTBOOK_EMAIL"
id="guestbook-email" validate="phocaguestbookemail" preicon="glyphicon glyphicon-envelope icon-envelope"
description="COM_PHOCAGUESTBOOK_FIELD_EMAIL_DESC" readonly="true" />
and I tried the other propositions
But it does not work
Or has there to be done anything other ?
Re: User and email should be read only
Posted: 20 Sep 2015, 12:52
by Jan
Hi, hmm, testing now in latest version - 3.0.4
changing
components\com_phocaguestbook\models\forms\guestbook.xml
to:
Code: Select all
<field name="email" type="phocaemail" class="input-xlarge" label="COM_PHOCAGUESTBOOK_EMAIL"
id="guestbook-email" readonly="true" validate="phocaguestbookemail" preicon="glyphicon glyphicon-envelope icon-envelope"
description="COM_PHOCAGUESTBOOK_FIELD_EMAIL_DESC" />
deactivates the form field in frontend, see image
Jan