Eduardo G. Posted June 11, 2010 Share Posted June 11, 2010 Hi all. I'm developing a gateway module using the provided php template. I have a problem using the config function: function template_config() { $configarray = array( "FriendlyName" => array("Type" => "System", "Value"=>"My Custom Module"), "username" => array("FriendlyName" => "Login ID", "Type" => "text", "Size" => "20", ), "transmethod" => array("FriendlyName" => "Transaction Method", "Type" => "dropdown", "Options" => "Option1,Value2,Method3", ), "instructions" => array("FriendlyName" => "Payment Instructions", "Type" => "textarea", "Rows" => "5", "Description" => "Do this then do that etc...", ), "testmode" => array("FriendlyName" => "Test Mode", "Type" => "yesno", "Description" => "Tick this to test", ), ); return $configarray; } When using input of type "dropdown" I must give a list of options ("Options" => "Option1, Value2, Method3"), but I need to know how can I use values for those options. Right now I'm getting a dropdown like this: <select name="language"> <option>Spanish</option> <option>English</option> </select> But I need this, as y gateway provider needs the code, not the name: <select name="language"> <option value="1">Spanish</option> <option value="2">English</option> </select> And I can not show the admin a dropdown like: "Select language: 1, 2, 3", I need to show the full name of each option (language, coin, etc.) and retrieve the value. I'm not asking for something that doesn't exist, just want to use the HTML value attribute. What can I do? 0 Quote Link to comment Share on other sites More sharing options...
downunder Posted August 12, 2010 Share Posted August 12, 2010 I have same problem for $additionaldomainfields, wondering how to set values for the drop downs! 0 Quote Link to comment Share on other sites More sharing options...
swhitley Posted August 23, 2010 Share Posted August 23, 2010 I have this question as well. I saw something about using the pipe, but that is not working for me in a server module. 0 Quote Link to comment Share on other sites More sharing options...
laszlof Posted August 23, 2010 Share Posted August 23, 2010 a quick print_r($params) should tell you how to reference them. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.