2017/6/2 Created.
2019/9/17 Updated.
smaconne's Form Info is usually set up to allocate one field at a time, so even a Notes form that is tabulated in a Notes form will look like the following on the document page with edit mode.

This section describes how to make it possible to enter this in the same way as Notes, in a tabular format as shown below.

As you can see in the screen capture above, the Notes form has five columns in one row: ride station/drop-off station, one-way trip cost, one way/round trip, and memo.
The contents of each column are as follows.
Field Title
| Field Name | Type | Control |
---|
Ride Station/Drop-Off Station
| station01~station16 | Text
|
|
One-Way Trip Cost
| fee1~fee8
| Number
|
|
One Way/Round Trip
| return_sw1~return_sw8
| Radio button
| One Way|0 Round Trip|1
|
memo
| memo1~memo8
| Text |
|
In smaconne's Form Info, insert a field row anywhere in the "Displayed Field" section and set it up as follows. Note that if you have already set up a field to be displayed in tabular form in "I want to display a table instead of fields in the document page with read mode.", you must set it up separately from that field. In that case, the "Detail" field for the reference page of the existing document, turn on the "Hide when document is opened for edit mode" checkbox in the "Hide Formula" section. And, the "Details" field for the edit page of the newly created document, turn on the "Hide when document is opened for read mode" checkbox in the "Hide Formula" section.
- Label Name: "Detail" (Optional)
- Field Name: (Empty)
- Field Type in Edit Mode: Select "Non edit (Display only)"
- Formula: Enter the formula to generate HTML code to display the following table
(If you are editing an existing document, it will appear here.)
tmp_0 := {<table border="0" cellpadding="0" cellspacing="0"><tr><th>Ride Station</th><th>Drop-Off Station</th><th>One-Way Trip Cost</th><th>One Way/Round Trip</th><th>Memo</th></tr>};
tmp_9 :={</table>};
tmp := "";
@For(n := 1; n <= 8; n := n + 1;
tmpInput1 := @If( n < 6; "station0" + @Text( n * 2 - 1 ); "station" + @Text( n * 2 - 1 ) );
tmpFrom := @GetField( tmpInput1 );
tmpInput2 := @If( n < 5; "station0" + @Text( n * 2 ); "station" + @Text( n * 2 ) );
tmpTo := @GetField( tmpInput2 );
tmpFee := @GetField( "fee" + @Text( n ) );
tmpReturn := @GetField( "return_sw" + @Text( n ) );
tmpMemo := @GetField( "memo" + @Text( n ) );
tmp := tmp + {<tr>
<td style="background: #f0f0f0;"><input name="} + tmpInput1 + {" id="} + tmpInput1 + {" style="width: 100%;" type="text" value="} + tmpFrom + {"></td>
<td><input name="} + tmpInput2 + {" id="} + tmpInput2 + {" style="width: 100%;" type="text" value="} + tmpTo + {"></td>
<td style="background: #f0f0f0;"><input name="fee} + @Text( n ) + {" id="fee} + @Text( n ) + {" style="width: 100%;" type="number" value="} + @Text( tmpFee ) + {"></td>
<td>} +
{<input type="radio" name="return_sw} + @Text( n ) + {" id="return_sw} + @Text( n ) + {" value="0"} + @If( tmpReturn = "0"; " checked"; "" ) + {>One Way<br />} +
{<input type="radio" name="return_sw} + @Text( n ) + {" id="return_sw} + @Text( n ) + {" value="1"} + @If( tmpReturn = "1"; " checked"; "" ) + {>Round Trip<br />} + {</td>
<td style="background: #f0f0f0;"><input name="memo} + @Text( n ) + {" id="memo} + @Text( n ) + {" style="width: 100%;" type="text" value="} + tmpMemo + {"></td>
</tr>}
);
tmp_0 + tmp + tmp_9
- Default value on new creation: Enter the formula to generate HTML code to display the following table
(It will appear here when you create a new document. The initial values for each field are set in the code.)
tmp_0 := {<table border="0" cellpadding="0" cellspacing="0"><tr><th>Ride Station</th><th>Drop-Off Station</th><th>One-Way Trip Cost</th><th>One Way/Round Trip</th><th>Memo</th></tr>};
tmp_9 :={</table>};
tmp := "";
@For(n := 1; n <= 8; n := n + 1;
tmpInput1 := @If( n < 6; "station0" + @Text( n * 2 - 1 ); "station" + @Text( n * 2 - 1 ) );
tmpFrom := "";
tmpInput2 := @If( n < 5; "station0" + @Text( n * 2 ); "station" + @Text( n * 2 ) );
tmpTo := "";
tmpFee := 0;
tmpReturn := "";
tmpMemo := "";
tmp := tmp + {<tr>
<td style="background: #f0f0f0;"><input name="} + tmpInput1 + {" id="} + tmpInput1 + {" style="width: 100%;" type="text" value="} + tmpFrom + {"></td>
<td><input name="} + tmpInput2 + {" id="} + tmpInput2 + {" style="width: 100%;" type="text" value="} + tmpTo + {"></td>
<td style="background: #f0f0f0;"><input name="fee} + @Text( n ) + {" id="fee} + @Text( n ) + {" style="width: 100%;" type="number" value="} + @Text( tmpFee ) + {"></td>
<td>} +
{<input type="radio" name="return_sw} + @Text( n ) + {" id="return_sw} + @Text( n ) + {" value="0"} + @If( tmpReturn = "0"; " checked"; "" ) + {>One Way<br />} +
{<input type="radio" name="return_sw} + @Text( n ) + {" id="return_sw} + @Text( n ) + {" value="1"} + @If( tmpReturn = "1"; " checked"; "" ) + {>Round Trip<br />} + {</td>
<td style="background: #f0f0f0;"><input name="memo} + @Text( n ) + {" id="memo} + @Text( n ) + {" style="width: 100%;" type="text" value="} + tmpMemo + {"></td>
</tr>}
);
tmp_0 + tmp + tmp_9
When you save the smaconne App Configuration document and display the document page with edit mode, the fields are displayed in a table format, as shown in the following image, and you can enter and save them.
Related Pages:
© 2025 BestCommunications, Inc.