Commits

Anonymous committed f04fdac

If getting values from input fields fails, then try to get the value from the
readonly field.

  • Participants
  • Parent commits c29d572

Comments (0)

Files changed (1)

formbar/templates/formbar.js

             if (tokens[j].contains("$")) {
                 tfield = tokens[j].replace('$', '');
                 value = $('input[name='+tfield+']').val();
+                // If we can not get a value from an input fields the field my
+                // be readonly. So get the value from the readonly element.
+                if (!value) {
+                    value = $('div[name='+tfield+']').text();
+                }
                 console.log(tokens[j].replace('$', ''));
                 eval_expr += value;
             } else {