Hello, I have two fields in a form that alternate as I select a third. This function is made with #dependency of ctools. I am trying to do a validation with #ajax so that the page is not read every time it is pressed. The user presses submit but on the screen that returns #ajax the functionality of #dependency of ctools is lost and the two fields can be seen at the same time. I have already tried many things but I am stuck, if someone has had the same problem I would appreciate the help. This is the code of the three fields.
This is returning the ‘id’ column in my table. I want a different column, entity_id. What should I call to return a different column rather than only returning the id column in the table.
I would like to create a form with 2 fields width_inch and with_cm where after the user insert the value automatically will be computed the other field.
I created template.php inside the theme directory (/ sites / all / themes / my_theme / template.php ):