In a Drupal 7 custom module, I am updating a record in the database using a form, and I am using the following code to update, but for some reason it is not updating. Who can help me out? When I replace the code $form_state['values']['res_name'] with Peter then the data will be updated.

  • 1
    Could you show the code for the actual db_update query? – Suranga Panagamuwa Gamage May 26 '15 at 23:07
  • 1
    I solved already. The problem was: #default-value and #value in my hook_form_alter. Thanks! – Noname May 27 '15 at 8:43

Your Answer

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

Browse other questions tagged or ask your own question.