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
User and email should be read only
- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: User and email should be read only
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
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
If you find Phoca extensions useful, please support the project
-
gtrennert
- Phoca Newbie

- Posts: 3
- Joined: 03 Oct 2011, 00:37
Re: User and email should be read only
Hello
Thanks - I'm not sure to understand :
I modified the xml like this :
and I tried the other propositions
But it does not work
Or has there to be done anything other ?
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" />But it does not work
Or has there to be done anything other ?
- Jan
- Phoca Hero

- Posts: 49138
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: User and email should be read only
Hi, hmm, testing now in latest version - 3.0.4
changing
components\com_phocaguestbook\models\forms\guestbook.xml
to:
deactivates the form field in frontend, see image

Jan
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" />
Jan
If you find Phoca extensions useful, please support the project