I have a form for creating and editing a Product. My problem is to pass a database derived variable to the form and select element. When editing a product, the user can select from a dropdown list the number of sub-products displayed (this number comes from a count of sub-products from the repository and must be called with the product_id parameter). The form needs to receive the parameter with the number and build a select element based on it. Have any of you done something similar and can share an example?