I am new here, just started to write a module. I am facing a issue to calculate a field and then calculate another field. Here in example, calculate amount in a line item, and on the field amount changed, calculate the total value.
I'm creating some additional functionality for a module and as a part of that I'd like to use the form state API to conditionally show and hide some elements. I've been able to toggle the visibility of a textfield using a select field but when i attempt to do the same for a datetime or table select field, it doesn't work and I'm sure why. Here's my code:
I have form created within modules search_api_solr and search_api_views. I used hoot_form_alter to change the form and add custom fieldset. At the hooks end form look similiar to this:
I have a form with a textfield for quantity and payment_reference field. I want to refresh the payment_reference field when the quantity is changed with ajax. After ajax call, the payment_reference field is not refreshed with the new quantity number. the form build code is like this: