Page 1 of 1

Disable changing name and e-mail adress

Posted: 11 Jan 2010, 22:41
by johnvandam
Hello,

I have a question:
I use Phoca Guestbook on a site where the guests have to log on before he or she can post messages.
now the name and e-mail adres are filled in but the can be changed.
now i want to prevent that.

Ill have tried to hide the input fields, but than are the name and e-mail adres not saved.

on this forum ill have found an option that contains this:
Change in the document: components\com_phocaguestbook\views\phocaguestbook\tmpl\default.php
line 235:

Code: Select all

<input type="text" name="pgusername" id="pgbusername" value="<
in

Code: Select all

<input type="text" name="pgusername" disabled id="pgbusername" value="<
and line 243:

Code: Select all

<input type="text" name="email" disabled id="pgbemail" value="
in

Code: Select all

<input type="text" name="email" disabled id="pgbemail" value="
but than i''ll have error messages to fill in the e-mail adress and the name.

my question, how can i realize what i want.
can anyone help me?

Re: Disable changing name and e-mail adress

Posted: 13 Jan 2010, 17:50
by Alhifi
Try this:

Code: Select all

<td colspan="3"><input type="hidden" name="pgusername" id="pgbusername" value="<?php echo $this->formdata->username ?>" size="32" maxlength="100" style="border:1px solid #cccccc"/><?php echo $this->formdata->username ?></td>
Bye
Alhifi

Re: Disable changing name and e-mail adress

Posted: 14 Jan 2010, 02:32
by johnvandam
Alhifi,

Thank you very much, it is the solution :D

John