Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2005-01-18 18:39:44

Neczy
New Member
Registered: 2004-07-12
Posts: 4

How can I add a tabindex="5" to the submit button?

Is there a way to add a tabindex=“5” to the submit button for comments? I could do it manually, by adding in the input code to my comment_form but that seems to mess up the remember me checkbox. Any ideas?

Offline

#2 2005-01-18 19:24:03

jaredigital
Member
From: Texas
Registered: 2004-10-26
Posts: 26
Website

Re: How can I add a tabindex="5" to the submit button?

I can’t figure out the code, but think you’d have to edit the textpattern/publish/comment.php file. The last value in all of these lines defines the tabindex for each particular form element:

<code>
$vals = array(
‘comment_name_input’ => $namewarn.input(‘text’,‘name’, $name, “25”,’‘,“1”),
‘comment_email_input’ => $emailwarn.input(‘text’,‘email’, $email,“25”,’‘,“2”),
‘comment_web_input’ => input(‘text’,‘web’, $web, “25”,’‘,“3”),
‘comment_message_input’ => $commentwarn.$textarea,
‘comment_remember’ => $checkbox,
‘comment_preview’ => input(‘submit’,‘preview’,gTxt(‘preview’),’‘,‘formbutton’),
‘comment_submit’ => $comment_submit_button
);
</code>

Note that the last line controls comment_submit, the Submit button. If someone can figure out how to hack that last line for you, I think you’ll have your solution.

Update: I tried to hack the code myself, but ended up blowing up my pages. Sorry. Hopefully someone else can figure it out.

Last edited by jaredigital (2005-01-18 19:34:10)

Offline

#3 2005-01-19 03:44:50

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: How can I add a tabindex="5" to the submit button?

Yes, you edit textpattern/publish/comment.php

line 186
? fInput('submit','submit',gTxt('submit'),'button')

I think it would need to be
? fInput('submit','submit',gTxt('submit'),'button','','','','5')

Offline

#4 2005-01-20 02:45:17

Neczy
New Member
Registered: 2004-07-12
Posts: 4

Re: How can I add a tabindex="5" to the submit button?

Yes! That worked! Thanks so much :)

Last edited by Neczy (2005-01-20 03:08:36)

Offline

#5 2005-01-20 03:08:29

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: How can I add a tabindex="5" to the submit button?

Care to share what that was?

Offline

#6 2005-01-20 03:10:08

Neczy
New Member
Registered: 2004-07-12
Posts: 4

Re: How can I add a tabindex="5" to the submit button?

Heh, I was modifying the wrong line, and then i tried again and it worked. Don’t ya hate when that happens? hehe

Offline

#7 2005-01-20 03:28:26

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: How can I add a tabindex="5" to the submit button?

S’alright.
(will never divulge how many times she done that) :D

Glad its working now. :)

Last edited by Mary (2005-01-20 03:29:02)

Offline

#8 2005-09-22 01:50:20

Etz Haim
Archived Plugin Author
From: Karlstad, Sweden
Registered: 2005-01-24
Posts: 262
Website

Re: How can I add a tabindex="5" to the submit button?

As of the time of this post, you have to edit this line on comment.php:

'comment_preview' => input('submit','preview',gTxt('preview'),'','button'),

to

'comment_preview' => input('submit','preview',gTxt('preview'),'','button','5'),

Offline

#9 2005-11-04 10:05:10

The-Exit
Member
From: Berlin
Registered: 2005-07-16
Posts: 175
Website

Re: How can I add a tabindex="5" to the submit button?

What about adding the “5” to the core code?

Offline

Board footer

Powered by FluxBB