Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ? Topic is solved

Need help with the Administration of your Joomla! 3.x site? This is the spot for you.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
nlogica
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Jan 01, 2024 6:15 am

Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

Post by nlogica » Mon Mar 04, 2024 11:24 am

Hi,

I'm running Joomla 3.10.12 on an old website.
Currently the contacts page has a Google map, Company information (street address, phone numbers, email address) and it also has a Form.

I would like to disable just the Form. I would like to keep the rest of the information visible.

I've tried to do the following:
Global configuration > Contacts > Form > Contact form : Hide

Screenshot: Image

But this hides the whole contents in the Contacts page, which is not what I'm looking for :(
What is the best approach?

gws
Joomla! Champion
Joomla! Champion
Posts: 5951
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

Post by gws » Mon Mar 04, 2024 12:05 pm

Create an article with the info and don't use the contact page.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

Post by Webdongle » Mon Mar 04, 2024 1:44 pm

Components >>> Contacts >>> Options ... select/unselect as required
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

nlogica
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Jan 01, 2024 6:15 am

Re: Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

Post by nlogica » Mon Mar 11, 2024 5:07 pm

Webdongle wrote:
Mon Mar 04, 2024 1:44 pm
Components >>> Contacts >>> Options ... select/unselect as required
Hey @webdongle,
Thanks for replying.
I would like to disable just the Form. I would like to keep the rest of the information visible. I don't see how to do this. Screenshot: https://i.imgur.com/QCacLyx.png

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 44096
Joined: Sat Apr 05, 2008 9:58 pm

Re: Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

Post by Webdongle » Mon Mar 11, 2024 6:55 pm

But the information is the form?
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"When I'm right no one remembers but when I'm wrong no one forgets".

User avatar
imanickam
Joomla! Master
Joomla! Master
Posts: 28206
Joined: Wed Aug 13, 2008 2:57 am
Location: Chennai, India

Re: Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

Post by imanickam » Tue Mar 12, 2024 3:58 am

nlogica wrote:
Mon Mar 04, 2024 11:24 am
But this hides the whole contents in the Contacts page, which is not what I'm looking for
This behavior could be due to the template that is being used for the site. What template is being used for the site?

You could test the behavior of core Joomla creating a test environment, install Joomla, and then test it with the default template. Do not install any other framework and templates before the testing is done.
Ilagnayeru (MIG) Manickam | இளஞாயிறு மாணிக்கம்
Joomla! - Global Moderators Team | Joomla! Core - Tamil (தமிழ்) Translation Team Coordinator
Former Joomla! Translations Coordination Team Lead
Eegan - Support the poor and underprivileged

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17445
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

Post by toivo » Tue Mar 12, 2024 7:19 am

If hiding the Contact Form does not work, the html folder of the template may have a com_contact folder, that is a template override, that does not check what has been configured in the Options of Contacts. The following steps show how to create a template override for the Contacts component, if required.

Go to Extensions - Templates - Templates and select the frontend template, then go to the tab Create Overrides and select com_contact - contact from the Components column. This operation will copy several files into the html subfolder of your frontend template.

Use the Editor tab in Templates or the File Manager in the cPanel provided by your host, browse to the html subfolder and find the folder com_contacts/contact. The folder has several files. Leave the file default.php there and delete the other files.

Edit the file default.php and remove the lines 111 to 139, shown below. That will remove the email form.

Code: Select all

	<?php if ($tparams->get('show_email_form') && ($this->contact->email_to || $this->contact->user_id)) : ?>
		<?php if ($presentation_style === 'sliders') : ?>
			<?php if (!$accordionStarted)
			{
				echo JHtml::_('bootstrap.startAccordion', 'slide-contact', array('active' => 'display-form'));
				$accordionStarted = true;
			}
			?>
			<?php echo JHtml::_('bootstrap.addSlide', 'slide-contact', JText::_('COM_CONTACT_EMAIL_FORM'), 'display-form'); ?>
		<?php elseif ($presentation_style === 'tabs') : ?>
			<?php if (!$tabSetStarted)
			{
				echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'display-form'));
				$tabSetStarted = true;
			}
			?>
			<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'display-form', JText::_('COM_CONTACT_EMAIL_FORM')); ?>
		<?php elseif ($presentation_style === 'plain') : ?>
			<?php echo '<h3>' . JText::_('COM_CONTACT_EMAIL_FORM') . '</h3>'; ?>
		<?php endif; ?>

		<?php echo $this->loadTemplate('form'); ?>

		<?php if ($presentation_style === 'sliders') : ?>
			<?php echo JHtml::_('bootstrap.endSlide'); ?>
		<?php elseif ($presentation_style === 'tabs') : ?>
			<?php echo JHtml::_('bootstrap.endTab'); ?>
		<?php endif; ?>
	<?php endif; ?>
Toivo Talikka, Global Moderator

nlogica
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Mon Jan 01, 2024 6:15 am

Re: Contacts page: How to hide the Form but leave the rest (address, phone, etc) visible ?

Post by nlogica » Wed Mar 13, 2024 11:47 pm

Thank you Toivo,
I had someone assist me, and he managed to hide just the contact form, I think it was in a similar fashion to what you suggested.


Post Reply

Return to “Administration Joomla! 3.x”