Discussion and Support

Skip to content

It is currently Tue Feb 20, 2018 6:53 pm 

Forum rules

Posting now open to all registered forum users.

Reply to topic  [ 1 post ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Joined: Tue Nov 10, 2009 6:11 pm
Posts: 8009
Location: Bay Area
 Post subject: [Bug]Form submit arguments and input values
PostPosted: Tue Nov 07, 2017 8:31 pm 
I think I may have found a bug. If I enter an argument value as a part of the <form action> it just concatenates the value to any <input> values passed to the processing macro in macro.args. The method is set to json. The input values are done correctly and put in to a json array. But the arguments set in the action (see Wiki: macroLinkText()) are oddly added to json. So, if I just put "test" as an argument and let's say I had no input other than submit value="test2" then my macro.args would look like this:


This is not a json. Looks like there is no comma and the quote is in the wrong place.

This is what I would expect.


If I had a json array, like ["test","test1"] as the argument, then it would be:


OR (probably better as)

As is the above format gives an error because of the bad formatting.

If I had a json object like this: {"test":1,"test1":2}, then I would expect this:


All the argument data would be in the 0 index of the array and input data in the 1 index. If there was no argument with the json method then it would pass a json object. Checking the macro.args type would be a good way to know if there was argument data.

For now, the workaround is not to use the argument parameter with the json method. If you need to have a set argument, then use <input type=hidden>.


Also, if someone does try to tackle this, there's also this: viewtopic.php?f=21&t=26731&p=263585&#p263585

Look at the next post in thread by me for the TL;DNR.


Let me add to this. When I pass &nbsp; as part of the value of an input, like when I format the text on a submit button, the form processes it as %EF%BF%BD which gives me the little square value which I assume is MT's unknown character. In my case, this isn't important but it's unexpected behavior.


Display posts from previous:  Sort by  
Reply to topic  [ 1 post ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there is 1 user online :: 0 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: No registered users and 1 guest

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman