Login or create new account.

By registering on joomprod.com, you will have immediate access to all our free products and to the public side of our support forum.

Enjoy our subscriptions.

Each of our subscriptions allow you to enjoy the private side of the support forum and all the update of our products for a period ranging from 3 months to 1 year.

Payment And immediate download.

After subscribing to one of our subscription, the products are immediately downloadable.

Login

Or Register
Accueil / forum / Support / AdsManager Support / [RESOLVED]Hidden value for search Input

Support Availability Because we must sleep sometimes

Working days: Monday to Friday.
Reply time: Depending on the complexity of your support issue it's usually between a few hours to 48 hours.

Support is only guaranteed to paid subscribers

AdsManager - End of life

It is with great regrets that we have chosen to end the developpement of Adsmanager and its other associated components.

AdsManager is born 10 years ago and, as of today, the number of new subscriptions and downloads have fallen and we cannot maintain the component anymore.

All active subscribers will be able to continue enjoying support until the end of their subscription.

The components will be free and no support will be provided anymore for the other users.

×

Notice

The forum is in read only mode.

[RESOLVED]Hidden value for search Input

More
11 years 1 month ago - 11 years 1 month ago #4466 by panta7
Hello guys,
I would like to insert a defaul value (es: type here) into the search Input module and hide it when a user type something.
The value should be translated with language override for all the languages installed on my site.

Is there a function that do this, please? Thanks.
Last edit: 11 years 1 month ago by panta7.
The following user(s) said Thank You: adarr
More
11 years 1 month ago - 11 years 1 month ago #4475 by loic
Replied by loic on topic Hidden value for search Input
Hello,

First, you need to create an override of the search module.
The process is explain here:
www.joomprod.com/documentation/doc-view-override.html

However, you need to override a module, so you don't need to create a subfolder with the view name. Just create a folder named 'mod_adsmanager_search' and directly paste the file 'default.php' in it.

Then, replace the line 33:
<input class="inputbox" type="text" name="tsearch" value="<?php echo $text_search; ?>" />

By this one :
<input class="inputbox" type="text" placeholder="type here" name="tsearch" value="<?php echo $text_search; ?>" />
Last edit: 11 years 1 month ago by loic.
More
11 years 1 month ago #4476 by panta7
Replied by panta7 on topic Hidden value for search Input
Ok thank you. For my purpose i prefered to do this:
<input class="inputbox" type="text" name="tsearch" value="<?php echo JText::_('ADSMANAGER_SEARCH_MODULE_INPUT_VALUE'); ?>" onblur="if(value=='') value = '<?php echo JText::_('ADSMANAGER_SEARCH_MODULE_INPUT_VALUE'); ?>'" 
    onfocus="if(value=='<?php echo JText::_('ADSMANAGER_SEARCH_MODULE_INPUT_VALUE'); ?>') value = ''" />

because PLACEHOLDER is not compatible with early IE10 and because I can translate the value in many languages using the costant.
The following user(s) said Thank You: adarr
Time to create page: 1.095 seconds
Powered by Kunena Forum