User:CrystianMarquez

About this board

i'm amateur user, learning how use mediawiki!! this is my e-mail contact

25 June 2015 04:30 UTC


Query string function

Hi! i can't make it work "query string" in parser function "#formlink"

i have this:

in a page i have

{{#formlink:form=Quote|link text=Add a quote for this author|link type=button|query string=Quote[Author]={{PAGENAME}} }}


  • i hav a form whit this code:
{{{info|page name=<Quote[Author]>_<unique number;start=1>}}}
{{{for template|Quote}}}
{| class="formtable"
! Date
| {{{field|Fecha|input type=date}}}
|-
! Author:
| {{{field|Author}}}
|-
! Menu:
| {{{field|Menu|input type=textarea with autocomplete}}}
|}
{{{end template}}}
  • i have this code in a template page "Template:Quote":
{|class="wikitable"
|Date
|{{{date|}}}
|-
|Author
|{{{Author|}}}
|-
|Menu
|{{{Menu|}}}
|}

Please help me!

  • i want that when i push de button "Add a quote for this author" it's create a page that is called whit the name of the page where is the button and a consecutive number.

i.e. let's say that i have a page called "main", in that page i have the button "Add a quote for this author" and when i push the button, it send me to the form "Quote" whit the field "Author" filled whit the page name of the page "main" and this form will create a page called "main 1" as an example. And the next time that i push the button that will create a new page called "main 2"

that's what i want


I hope you can help me!! please!!

What does the URL for the form look like, after you get to that form via the #forminput call? Yaron Koren (talk) 14:56, 29 June 2014 (UTC)


I think, that i need rise the question another time...

i'll try to explain me, i have this code:

1.

{{#formlink:form=Quote|link text=Add a quote for this author|link type=button|query string=Quote[Author]={{PAGENAME}} }}

but it does not work, the "query string" does not send any information to the form, i don't know why.

in the same page i have this code below

2.

{{#autoedit:form=Quote|link type=button|link text=Modify Author|query string=Quote[Author]=Mark|target={{FULLPAGENAME}}|summary=Modify author }}

whit this code the "query string" works and sends the information,

i want to know what i've done wrong in the first case. why does not work "query string" in the first code?.

thanks man!

You're supplying all sorts of information that's not relevant. Please just answer my questions - specifically, what does the URL look like after you click on the #formlink button? Does it contain the words "Quote" or "Author"? Yaron Koren (talk) 22:40, 3 July 2014 (UTC)


OK

yes, the URL yes, looks like this after i click the button #formlink:

/atcaresdemo/index.php/Especial:FormEdit/Quote?Quote%5BAuthor%5D=Pruebas%2FQuery+String

The URL contains the words "Quote" and "Author"

the name of my wiki is : atcaresdemo

the the "pagename" is: Pruebas

The form name is: Quote

The template name is: Quote

The variable is: Author

That URL looks correct... does the "Author" field show up as blank, or does any text appear in it? Yaron Koren (talk) 00:01, 4 July 2014 (UTC)

answer

The "Author" field appears as blank. No data


this is the link where i've the example.

Link to the example


Okay, thanks. This is very strange - I tried it out, and Semantic Forms seems to be ignoring the query string almost completely. Have the SF code, or core MediaWiki, on your site been modified in any way? Yaron Koren (talk) 23:21, 7 July 2014 (UTC)

maybe, i'm not pretty sure, my old programer modified some extensions, i´m going to take a look at the SF code. The strange is that the "query string" works for "#autoedit" but does not work for "#formlink" or "forminput"... anyway i'm pretty greatful by your help. if the SF code it's fine, have you any idea that what's happening?

No. Yaron Koren (talk) 15:25, 8 July 2014 (UTC)
CrystianMarquez (talkcontribs)

Probando tema nuevo

{{#formlink:form=Quote|link text=Add a quote for this author|link type=button|query string=Quote[Author]=S7lqovf9khut7osi}}

Reply to "Probando Thread"
There are no older topics