1

I've got a webform in a block (using webform pay and webform block) which printing in a overridden template via module_invoke.

There is a simple price field (input). In the content type i`ve got a price field also. I am using this kind of script to copy value from node's price div to another input field in a block:

$(document).ready(function(){
  var txt = $('.field-field-price .field-item').html();
  var txt = jQuery.trim(txt);
  $('#edit-submitted-price').val(txt);
});

The needed value displays just fine but in html value="" and i just can`t submit the form with needed value in price field. The screen-shot is attached. Thanks in advance for your time and understanding! price field displays valut but value="" :(

1

The value attribute for text inputs determine the initial value, it does not change when the user inputs something in the field or when it's changed by JavaScript.

If you are experience some error, it's most likely something else that's the problem.

  • You were right - the question appeared to be answered – Rootical V. Mar 4 '12 at 20:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.