Rubens Cury Posted March 17, 2015 Share Posted March 17, 2015 Hi, Does anybody knows witch is the best way to retrieve language inputs from a submitted form? Shoud I use Tools::getValue('fieldname'.$langvar) for each language field or by chance there's any other helper for this purpose instead? Thank you very much Link to comment Share on other sites More sharing options...
Rubens Cury Posted March 17, 2015 Author Share Posted March 17, 2015 I can't find out HOW the this function retrieve the legend_$language field into the submitted form. Someone could please help me? <input type="text" id="legend_{$language.id_lang}" {if isset($input_class)}class="{$input_class}"{/if} name="legend_{$language.id_lang}" value="{$product->name[$language.id_lang]|escape:'html':'UTF-8'}" public function ajaxProcessaddProductImage() { self::$currentIndex = 'index.php?tab=AdminProducts'; $product = new Product((int)Tools::getValue('id_product')); $legends = Tools::getValue('legend'); if (!is_array($legends)) $legends = (array)$legends; Link to comment Share on other sites More sharing options...
Rubens Cury Posted March 17, 2015 Author Share Posted March 17, 2015 Solved }).on('fileuploadsubmit', function (e, data) { var params = new Object(); $('input[id^="legend_"]').each(function() { id = $(this).prop("id").replace("legend_", "legend[") + "]"; params[id] = $(this).val(); }); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now