Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-07-14 06:50:41

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 276

how to change the comment form buttons value

i have three sections (English, Arabic, French)
for each section the button`s value of comment form should be different like Submit, Preview

Last edited by raminrahimi (2015-07-14 06:55:44)

Offline

#2 2015-07-14 09:25:05

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,137
GitHub

Re: how to change the comment form buttons value

I can’t answer your question, raminrahimi, but I have raised this feature request to see if <txp:text /> can be used to achieve what you want in the future.

Offline

#3 2015-07-14 11:10:32

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,304

Re: how to change the comment form buttons value

You could use rah_replace to alter the button text, together with if_section.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#4 2015-07-14 12:44:04

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: how to change the comment form buttons value

Perhaps

<txp:php>
global $textarray;
$textarray = load_lang('fr-fr');
</txp:php>

Offline

#5 2015-07-14 14:44:07

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: how to change the comment form buttons value

If you want just these buttons, though, you can set previewlabel and submitlabel attributes of <txp:comments_form /> in comments_display form:

<txp:comments_form previewlabel="Aperçu" submitlabel="Envoyer" ... />

See here for all attributes.

Offline

#6 2015-07-14 17:29:23

raminrahimi
Member
From: India
Registered: 2013-03-19
Posts: 276

Re: how to change the comment form buttons value

Hi etc !
you are the best :-)
all the time you provide the best and easy solutions :-)

Offline

#7 2015-07-14 18:20:06

etc
Developer
Registered: 2010-11-11
Posts: 5,053
Website GitHub

Re: how to change the comment form buttons value

That’s debatable, but thanks! :) I have no much time to help on the forum atm, so glad to do it when I can.

I think the first proposal is more logical, since it changes all language strings, but you see better what suits your needs.

Offline

Board footer

Powered by FluxBB