Topic on Project:Support desk

How to Pass Page_Forms Page-Name (forminput) to Template?

3
Johnywhy (talkcontribs)

My template is called Template:Thing. It contains: {{{MyParam}}}

My PageForm contains:

...
{{#forminput:form=Thing}}
...
{{{for template|Thing}}}
{| class="formtable"
      |}
{{{end template}}}
...

How to load the user-entered name of the new page into the `MyParam` parameter of the template? -thx

@Yaron Koren

Johnywhy (talkcontribs)

i noticed that, on Submit, "page_name" gets passed as query parameter to form in url. So, is "page_name" the variable i need to pass to the Template?

I tried using that variable in the Form, but didn't work. I'm doing something wrong:

{{{for template|Thing}}}
{| class="formtable"
! page_name: 
| {{{field|MyParam}}}
|}
{{{end template}}}

This causes a "page_name" field to appear in the form, but don't want that. Just want to get value from default text-field.

Johnywhy (talkcontribs)

anyone have any ideas for this?

Reply to "How to Pass Page_Forms Page-Name (forminput) to Template?"