Keyword

Is it possible to remove e-mail field from comment form?

  • Nexus Star
  • Nexus Star's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #85714 by Nexus Star
My client wishes to remove e-mail field from comment form.It's not problem to remove it from templateI comment out the lines 22and 23 in item_comment_form.phpbut it remains the problem with validationfor that I changed the item.php lines 618 to 623in component/com_k2/modelsThis solved my problem and I successfully removed the e-mail field from comment form but when I need to upgrade the K2 component the changes in item.php need to be made anew Is there easiest solution for this which I miss to see?

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #85715 by zazel baltao
Hi

 

I wondered if you found an easier solution for this please, or if not would you be able to be so kind as to post the exact code you changed from what to what etc. as I do not understand code.

 

Many, maay thanks

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #85716 by Jiliko.net
Hi,

 

Yes, there's an easiest way to do that without K2 hacks :

 

copy the attached file in :

'templates/YOURJOOMLATEMPLATE/html/com_k2/templates/YOURK2TEMPLATE/item_comments_form.php' (create folders if necessary)

 

YOURK2TEMPLATE is 'default' by default if you have made no K2 template overriding for now.

 

What is modified in this file ?

The original code for the email input has been commented and replaced by a hidden field with a value set to 'This email address is being protected from spambots. You need JavaScript enabled to view it.' (you can change it with one of your choice, it's line #30)

 

Regards,

 

Olivier 

Please Log in or Create an account to join the conversation.

More
13 years 8 months ago #85717 by zazel baltao
Hi

 

Thanks so much for taking the time to reply.  In the end I decided to keep the email field but just use the hack so it would not validate and stop people from posting without logging in first (if their email already in system etc.)

 

but thanks I will keep this file if I have a need to remove it completely.

 

Again thanks so much :)

 

 

Olivier Nolbert said:

Hi,

 

Yes, there's an easiest way to do that without K2 hacks :

 

copy the attached file in :

'templates/YOURJOOMLATEMPLATE/html/com_k2/templates/YOURK2TEMPLATE/item_comments_form.php' (create folders if necessary)

 

YOURK2TEMPLATE is 'default' by default if you have made no K2 template overriding for now.

 

What is modified in this file ?

The original code for the email input has been commented and replaced by a hidden field with a value set to 'This email address is being protected from spambots. You need JavaScript enabled to view it.' (you can change it with one of your choice, it's line #30)

 

Regards,

 

Olivier 

Please Log in or Create an account to join the conversation.

  • Enes
  • Enes's Avatar
  • Offline
  • Moderator
  • JoomlaBilgi.org
More
12 years 11 months ago #85718 by Enes
I want to remove email and website URL field... I don't want my visitors to enter these informations. How to do it?

Thank you so much...

we love K2...
Joomla Templates |

Please Log in or Create an account to join the conversation.

More
11 years 11 months ago #85719 by Luis C Escajeda
I really want to thanks you beyond words for your kind help you are really awesome
really really thanks you to all of you!!!!

you rule!!!

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum