amd.miri Posted December 9, 2011 Share Posted December 9, 2011 Hello everybody, does somebody know how to create a mandatory parameter for a module in the admin site? I explain myself : after installing a module (in my case ,it's a shipping module that I developed myself) , you are directed to the page of the installed module and when you click on the installed module, there are some personalized parameters on the right side to be filled in. so my question is there : how can I have a mandatory parameter? that means that if the parameter is not filled in , then the module should not work... and better the admin can have a message that there's a configuration missing. is that possible? in my case my parameters are defined like this : tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) VALUES ('The Netherlands - Sender ID', 'MODULE_SHIPPING_NL_SENDER_ID', '', 'For using this module in The Netherlands, you need to register on test.nl', '6', '0', now())"); thanks in advance for your help Miri Quote Link to comment Share on other sites More sharing options...
multimixer Posted December 9, 2011 Share Posted December 9, 2011 There is no validation for what is entered of is is entered, however, the whole thing is a form. Maybe the easiest would be to add a text saying what you want to say, as you already did in the field description To prevent the module from working, you can add a condition for this either within function execute() (or quote()) or earlier, when the class is checking if the module is enabled or not , something like this Quote My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
amd.miri Posted December 12, 2011 Author Share Posted December 12, 2011 mmm... your suggestion gives me some new ideas... ok I'll try it and I'll come back for the feedback, thanks Georges ;) 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.