This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to create Form Action to enable/disable single-relational field

I have a Single-Relational "Existing Supplier" field in the primary table, which link to the Multi-Relational field "Available Suppliers" in Suppliers auxiliary table. "Value display format" of Suppliers table is "{FirstName}, <b>{LastName}</b> - <b>{Code}</b>". The submit form shows 2 fields "New Supplier?" Binary/Trinary filed (with 2 options: New Supplier, Existing Supplier). and "Existing Supplier" field. How can I control "Existing Supplier" field based on "New Supplier?" field?

For example:

   If "New Supplier?" is New Supplier

         disable "Existing Supplier" field dropdown list

   Else if "New Supplier?" is Existing Supplier

          disable the icon next the dropdown list of "Existing Supplier" field. which link to adding new record form

Thank you

Parents
  • Verified Answer

    +1  

    The form action is pretty simple. It would look something like below. Then, you would click each of the underline sections to select the fields and values you want to use. The trick will be the last part about disabling the icon next to the drop down. That is not a built-in feature of SBM. It is probably possible using javascript, but you would need to figure out the script. Maybe someone else on here will jump in with some code they have used in the past. 

    Anyone else have some sample code to remove/disable the submit button next to a relational field dropdown?

    Steps to make a form action:

Reply
  • Verified Answer

    +1  

    The form action is pretty simple. It would look something like below. Then, you would click each of the underline sections to select the fields and values you want to use. The trick will be the last part about disabling the icon next to the drop down. That is not a built-in feature of SBM. It is probably possible using javascript, but you would need to figure out the script. Maybe someone else on here will jump in with some code they have used in the past. 

    Anyone else have some sample code to remove/disable the submit button next to a relational field dropdown?

    Steps to make a form action:

Children