-
AuthorPosts
-
xuxo Friend
xuxo
- Join date:
- November 2013
- Posts:
- 105
- Downloads:
- 13
- Uploads:
- 12
- Thanks:
- 24
- Thanked:
- 1 times in 1 posts
August 17, 2015 at 4:08 pm #662468Hi, field labels in Spanish contact form appears in english. See screenshot
I just found the following code in ../templates/uber/js/script.js, in line 69
// Add Placeholder form contact
var formContact = $('.contact-form-1');
if (formContact.length > 0) {
$('#jform_contact_name', formContact).attr('placeholder','Name');
$('#jform_contact_email', formContact).attr('placeholder','Mail');
$('#jform_contact_emailmsg', formContact).attr('placeholder','Subject');
$('#jform_contact_message', formContact).attr('placeholder','Write your message here');Please I’d like to know how to setup this in more than one language.
Thanks a lot for your help
xuxo
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
August 18, 2015 at 10:25 am #662649Hi xuxo,
Let me check whether we can add language constants within this javascript or not.
Will get back to you.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
August 18, 2015 at 10:25 am #745807Hi xuxo,
Let me check whether we can add language constants within this javascript or not.
Will get back to you.
xuxo Friendxuxo
- Join date:
- November 2013
- Posts:
- 105
- Downloads:
- 13
- Uploads:
- 12
- Thanks:
- 24
- Thanked:
- 1 times in 1 posts
August 24, 2015 at 9:47 am #664891Some new on this issue ??
Thanks for your help
xuxo
xuxo Friendxuxo
- Join date:
- November 2013
- Posts:
- 105
- Downloads:
- 13
- Uploads:
- 12
- Thanks:
- 24
- Thanked:
- 1 times in 1 posts
August 24, 2015 at 9:47 am #746393Some new on this issue ??
Thanks for your help
xuxo
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
August 25, 2015 at 7:47 am #665115Hi xuxo,
You can open above script.js file in Uber template folder and change to this:
// Add Placeholder form contact
var formContact = $('.contact-form-1');
if (formContact.length > 0) {
$('#jform_contact_name', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_EMAIL_NAME_LABEL'));
$('#jform_contact_email', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_EMAIL_LABEL'));
$('#jform_contact_emailmsg', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_MESSAGE_SUBJECT_LABEL'));
$('#jform_contact_message', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_MESSAGE_SUBJECT_DESC'));if($('.ie8').length > 0) {
$("input[placeholder], textarea[placeholder]", formContact).each(function(i, e){
if($(e).val() == "") {
$(e).val($(e).attr("placeholder"));
}
$(e).blur(function(){
if($(this).val()=="")
$(this).val($(e).attr("placeholder"));
}).focus(function() {
if($(this).val() == $(e).attr("placeholder"))
$(this).val("");
});
});
}
}
Download the attached file and unzip it to: /root/templates/uber/html/com_contact/contact/default_form-1.php
Finally, open the language file for com_contact in associated language folder on your site. For example, if English is default language, go to file: /root/language/en-GB/en-GB.com_contact.ini and add translated text for above text field
Remember to backup files before making change.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
August 25, 2015 at 7:47 am #746506Hi xuxo,
You can open above script.js file in Uber template folder and change to this:
// Add Placeholder form contact
var formContact = $('.contact-form-1');
if (formContact.length > 0) {
$('#jform_contact_name', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_EMAIL_NAME_LABEL'));
$('#jform_contact_email', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_EMAIL_LABEL'));
$('#jform_contact_emailmsg', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_MESSAGE_SUBJECT_LABEL'));
$('#jform_contact_message', formContact).attr('placeholder',Joomla.JText._('COM_CONTACT_CONTACT_MESSAGE_SUBJECT_DESC'));if($('.ie8').length > 0) {
$("input[placeholder], textarea[placeholder]", formContact).each(function(i, e){
if($(e).val() == "") {
$(e).val($(e).attr("placeholder"));
}
$(e).blur(function(){
if($(this).val()=="")
$(this).val($(e).attr("placeholder"));
}).focus(function() {
if($(this).val() == $(e).attr("placeholder"))
$(this).val("");
});
});
}
}
Download the attached file and unzip it to: /root/templates/uber/html/com_contact/contact/default_form-1.php
Finally, open the language file for com_contact in associated language folder on your site. For example, if English is default language, go to file: /root/language/en-GB/en-GB.com_contact.ini and add translated text for above text field
Remember to backup files before making change.
1 user says Thank You to Saguaros for this useful post
GTR Webdesign FriendGTR Webdesign
- Join date:
- August 2014
- Posts:
- 45
- Downloads:
- 26
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 13 times in 5 posts
December 8, 2016 at 7:57 am #993134Hello @saguaros,
Is it possible to upload the file we have to unzip to: /root/templates/uber/html/com_contact/contact/default_form-1.php again?
I think this download was lost in the process of the new JoomlArt website.
With kind regards,
Michiel Smit
Grafi Totaal ReclameSaguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 8, 2016 at 8:23 am #993151Hi Michiel Smit,
May I know which Uber style are you using? Could you update the URL of contact page here so I can have a look?
GTR Webdesign FriendGTR Webdesign
- Join date:
- August 2014
- Posts:
- 45
- Downloads:
- 26
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 13 times in 5 posts
December 8, 2016 at 8:49 am #993158Sure @saguaros,
The link is: http://web0087.zxcs.nl/~towerliv/en/contact
I already did step one (the edit of the script.js) so there is no text in the placeholders at this time.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 9, 2016 at 10:08 am #993378You can send me the Admin & FTP account of your site, I will check for you.
P/s: you can provide info via your reply and flag it as PRIVATE reply.
GTR Webdesign FriendGTR Webdesign
- Join date:
- August 2014
- Posts:
- 45
- Downloads:
- 26
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 13 times in 5 posts
December 9, 2016 at 1:09 pm #993409Hello @saguaros,
I can only give you access to the Admin of the website if you give me your IP-adress, so I can whitelist you.
But isn’t it possible to give me the right code so I can do it myself? I already changed the code of the ../templates/uber/js/script.js in the code you provided in the old topic post. The only thing I need is the "download" you refer to in this topic post of August 25, 2015 at 7:47 am.
With kind regards,
Michiel Smit Grafi Totaal Reclame
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
December 12, 2016 at 8:28 am #993756This reply has been marked as private.GTR Webdesign FriendGTR Webdesign
- Join date:
- August 2014
- Posts:
- 45
- Downloads:
- 26
- Uploads:
- 5
- Thanks:
- 6
- Thanked:
- 13 times in 5 posts
-
AuthorPosts
This topic contains 16 replies, has 3 voices, and was last updated by Saguaros 7 years, 11 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum