Topic on Extension talk:InputBox

Several input boxes forms a name for an artilce

8
Fokebox (talkcontribs)

Could someone let me know if it is possible to make that several input boxes forms a name for an artilce? Example: First input box has name of the book, second author of the book and result is "Name of the book - Name of the author"

Quiddity (WMF) (talkcontribs)

Hi Fokebox. Please could you give us more details about "the problem you are trying to solve"? What you have given above is "the solution you think might work", which doesn't help us understand alternative ways we might be able to help you. Thanks!H

Fokebox (talkcontribs)

So I would like to have for example two boxes. I want to fill author name to the first one and book name to the second one and after pressing button create page I want to have a result Author Name - Book Name

Quiddity (WMF) (talkcontribs)

Ah, I think I understand. It is not possible to have two separate textfields that automatically combine using this.

What you could do instead, is use the "placeholder" parameter to give the editor a hint about the preferred title convention. E.g.

 
 <inputbox>
 type=create
 placeholder=Author Name - Book Name
 prefix=Special:Mypage/
 break=no
 buttonlabel= &nbsp;                     foo                    &nbsp;
 </inputbox>

which results in

Hope that helps.

Fokebox (talkcontribs)

Thank you! I did so, but I wanted two separate boxes ) one for Author another for Book ) ... any way it also fine for me

Fokebox (talkcontribs)

I have one more question - How can I set button width?

Quiddity (WMF) (talkcontribs)

I've added a hacky example to my demo above. Please don't overuse it!

Fokebox (talkcontribs)

I did so before your example ) I thought there is a set for button width just like for input itself )

Reply to "Several input boxes forms a name for an artilce"