Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By ekaboom
#788082
Ok, I need one form to let a user input a range (3-8) of Categories into textboxes and another dynaform to add those categories into a drop down box.

What would be the recommended way to do that?

1. Create a grid with a textbox that locks down only allows 3-8 rows to be added and then grab that data and move it to the dropdown box?

2. Add 1-8 text boxes (require 3) and then move that data to the dropdown box?

Here're the hurtles I have to overcome that I'm not exactly sure how to do for either of them.

For the first one, I know how to limit the number of rows, but how do you move the grid row info into a dropdown box outside of the grid?

For the second one, I added the @@variable to the options (not sure if that is the right way to do it) but if I do it this way, all the fields that are left blank in the first dynaform, appear as a blank option in the dropdown menu of the next dynaform. If this method is the better way than the first, is there a way to remove any variables that are blank from the dropdown box? I've tried multiple things but can't seem to get it to work.

Thanks
#788114
Let's say that the the variable for your grid is named categoriesList and it contains fields with the IDs of categoryId and categoryName in the first DynaForm. In the second DynaForm you have a dropdown box. In the properties of that dropdown, set its data source to "array variable" and its data variable to @@aCategories

Then, the trigger after the first DynaForm would be:
Code: Select all
@=aCategories = array();
if (isset(@=categoriesList and is_array(@=categoriesList)) {
   foreach(@=categoriesList as $aRow) {
      @=aCategories[] = array(
            $aRow['categoryId'],
            $aRow['categoryName']
       );
   }
}        

Hello. For rental housing, there are software solu[…]

Experience heightened pleasure with Cenforce 100 M[…]

Get an instant solution to move emails to MBOX for[…]

Most Demanding OST to PST Converter

The most demanding OST to PST Converter is TrijaT[…]