How Do I Add Controls to an Existing Form? (Magic xpa 3.x)
After you have created a Browser-client program, you may need to add more controls to the HTML page. When you do this, you will need to then modify your Magic xpa program to recognize and work with these new controls. Here is how to do it.
-
Add the new control to the HTML. Set the name= attribute to what will be used to link to the element in Magic xpa. In our example, the name is “v_CustName”.
-
Add the virtual or real variable that will be linked to this field.
-
Go to the form in your Magic xpa program.
-
Zoom from the Form name. This will bring up the existing HTML controls.
-
Move the cursor to the line above where you want the new entry to be in the HTML controls list. Then press the New HTML Tags button. This will bring up a list of all the tags that are not currently referenced in the HTML controls list. Highlight the one you want, then click Select. The control will be brought back to the HTML controls list. You can use Ctrl+Click to select more than one control if you need to.
-
Zoom from the Var column to select the variable that will attach to this control. Alternatively, you can zoom from the Exp column to use an expression.
Now, the new control will function as part of the Browser task.