I'm trying to show this code only in the field that contains the value, there is no field that is not valid This is not going to work for display
Any ideas what I am doing wrong?
My simple test form is here
/ ** * Table of the submitted values * * @ Ultimate $ form_vals array form data submitted * @param $ select_mapping array Select components for values label chocies * @return HTML * / function_format_form_state ($ form_vals = array (), $ Select_mapping) of the themed table {$ output = ''; $ Header = array (); $ Rows = array (); If (empty! ($ Form_vals) {foreach ($ form_vals $ component_name = & gt; $ component_value as} {$ rows = array_merge ($ rows, _add_component_row ($ component_name, $ component_value, 0, $ select_mapping)); }} $ Output. = Theme ('Table', $ Header, $ Rows); Return $ output; }
/ ** * create a table of values presented * * @ The ultimate $ select_mapping array select the component for your values label chocies * @param $ value ARM form data is submitted * @return html * / function_format_form_state ($ select_mapping, $ values = array ()) of themed tables {$ Header = array (T ('first'), T ('second'), T ('third'), T ('fourth')); $ Rows = array (); Forex currency ($ cname = & gt; $ value as $ cval) {$ rows [=] = array ($ cname, $ cval, 0, $ select_mapping); } Return Theme_table ($ header, $ rows); } The first argument should be in the $ select_mapping function. The argument with the default value should not be before the argument without the default value.
Comments
Post a Comment