Defining Custom License Attributes
When you define custom license attributes using FlexNet Operations for FlexNet Licensing, the trial registration template will automatically generate code for these attributes. However, the auto-generated code is not visible to the user until you remove the code style="display: none", which is included by default. For more information on the effect of style="display: none", see Customization with Toggle Switch for Custom License Attributes.
Producer Portal users need to ensure these custom license attributes match existing part numbers. For custom license technology (other than FlexNet Licensing), the producer user has to define custom license attributes manually. The code snippets in this section help you with this task.
Customizing Custom Content Code for a Single Part Number
The following code snippet demonstrates how to create a trial activation for only one part number. The snippet shows custom content code for data type “number”. For snippets using different data types, see Custom License Attribute Code Samples for Different Data Types.
<fieldset>
<ol>
<div id="Flexnet_Part1" class="WideColumnBlock left" >
<li class="liExtProperty"><label class="required">CustLMA1:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CustLMA1'][0]" />
</li>
</div>
</ol>
</fieldset>
Notes
• | Flexnet_Part1 is the part number that was created and mapped to the product for trial activation. |
• | CustLMA1 is the name of the custom license model attribute. |
• | In the trial registration template, this code snippet can be placed after the "Please answer the following questions" paragraph tag which is already included in the sample code. |
Customizing Custom Content Code for Multiple Part Numbers with Different Custom License Attributes
If the trial registration allows the user to select between multiple part numbers, you can customize the content code so that either:
• | only custom license attributes are displayed that apply to the part number that the user has selected. See Customization with Toggle Switch for Custom License Attributes. |
• | all configured custom license attributes are displayed in the End-User Portal, irrespective of the part number selection. See Customization Without Toggle Switch for Custom License Attributes. |
The following subsections explain how to customize the code and possible use cases for both scenarios.
Customization with Toggle Switch for Custom License Attributes
When you customize the code to include a toggle switch, the End-User Portal initially does not display any custom license attributes. When the user selects a part number, only those custom license attributes are displayed that apply to the selected part number. When the user clears the part number selection, the custom license attributes are hidden.
Use the code style="display: none" to hide custom license attributes, as shown in the following snippet.
<fieldset>
<ol>
<div id="Flexnet_Part1" class="WideColumnBlock left" style="display: none" >
<li class="liExtProperty"><label class="required">CUSTLMA_4_Flexnet_Part1:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CUSTLMA_4_Flexnet_Part1']
[0]" />
</li>
</div>
<div id="Flexnet_Part2" class="WideColumnBlock left" style="display: none" >
<li class="liExtProperty"><label class="required">CustLMA1:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CustLMA1'][0]" />
</li>
<li class="liExtProperty"><label >CustLMA2:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CustLMA2'][0]" />
</li>
</div>
</ol>
</fieldset>
Notes
• | The code style="display: none" hides the license attributes for all unselected part numbers. If you want the preview to show the license attributes for all part numbers (regardless of whether they are selected), remove the code style="display: none" and then generate a preview. Make sure that after the preview you add this code back to the custom content to enable the toggle functionality in the End-User Portal. |
• | Flexnet_Part1 and Flexnet_Part2 are the part numbers created and mapped to products for trial activation. |
• | CUSTLMA_4_Flexnet_Part1, CustLMA1 and CustLMA2 are the names of the custom license model attributes. |
• | License attributes CUSTLMA_4_Flexnet_Part1 and CustLMA1 are required attributes, as indicated by <label class="required">, whereas license attribute CustLMA2 is optional. |
Customization Without Toggle Switch for Custom License Attributes
When you do not include a toggle switch, all configured custom license attributes related to available trial part numbers are displayed in the End-User Portal, irrespective of the part number selection.
Note:If you have multiple products defined that use different license models, it is possible that each license model has different custom license attributes defined. For trial activation, all custom license attributes that are associated with the product are displayed, irrespective of the selected part number. In this case, it might be advisable to include a toggle switch, as described in Customization with Toggle Switch for Custom License Attributes.
Sample code
<fieldset>
<ol>
<div id="Flexnet_Part1" class="WideColumnBlock left" >
<li class="liExtProperty"><label class="required">CUSTLMA_4_Flexnet_Part1:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CUSTLMA_4_Flexnet_Part1']
[0]"/>
</li>
</div>
<div id="Flexnet_Part2" class="WideColumnBlock left" >
<li class="liExtProperty"><label class="required">CustLMA1:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CustLMA1'][0]" />
</li>
<li class="liExtProperty"><label >CustLMA2:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CustLMA2'][0]" />
</li>
</div>
</ol>
</fieldset>
Notes
• | Flexnet_Part1 and Flexnet_Part2 are the part numbers created and mapped to products for trial activation. |
• | CUSTLMA_4_Flexnet_Part1, CustLMA1 and CustLMA2 are the names of the custom license model attributes. |
• | License attributes CUSTLMA_4_Flexnet_Part1 and CustLMA1 are required attributes, as indicated by <label class="required">, whereas license attribute CustLMA2 is optional. |
Custom License Attribute Code Samples for Different Data Types
The code snippets in this section demonstrate how to customize the custom license attributes for different data types.
Type "Number"
<li class="liExtProperty"><label >CUSTLMA_4_Flexnet_Part1:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CUSTLMA_4_Flexnet_Part1'][0]" />
</li>
Type "Boolean"
<li class="liExtProperty"><label >CLM_BOOLEAN:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CLM_BOOLEAN'][0]" />
</li>
Note that currently the Boolean data type accepts only true or false as whole words, not T or F as on the Trial Registration page.
Type "Date"
<li class="liExtProperty"><label >CLM_DATE:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CLM_DATE'][0]" />
</li>
Note that currently the Date data type accepts only the date format "MM/DD/YYYY" (for example, 10/24/2018) on the Trial Registration page.
Type "Long Text" and Subtype "Text Area"
<li class="liExtProperty"><label >CLM_LONG_TXT_TXT_AREA:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CLM_LONG_TXT_TXT_AREA'][0]" />
</li>
Type "Long Text" and Subtype "Text Field"
<li class="liExtProperty"><label >CLM_LONG_TXT_TXT_FLD:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CLM_LONG_TXT_TXT_FLD'][0]" />
</li>
Type "Text" and Text Type "Single Select"
You can choose between a dropdown menu or radio buttons.
<li class="liExtProperty"><label >CLM_TEXT_FREFORM_SINGLE_SELECT:</label>
• | Code snippet for dropdown menu: |
<select ng-model="formData.licenseCustomAttributes['CLM_TEXT_FREFORM_SINGLE_SELECT'][0]"
ng-options="v as v for v in selectedLicenseCustomAttributes['CLM_TEXT_FREFORM_SINGLE_SELECT'].
values"/>
• | Code snippet for radio buttons: |
<table cellspacing="0" cellpadding="0" border="0">
<tbody><tr ng-repeat="value in selectedLicenseCustomAttributes['CLM_TEXT_FREFORM_SINGLE_SELECT'].
values">
<td valign="top" nowrap="true">
<input class="form" type='radio' ng-model="formData.licenseCustomAttributes['CLM_TEXT_FREFORM_SINGLE_SELECT']
[0]"
name="formData.licenseCustomAttributes['CLM_TEXT_FREFORM_SINGLE_SELECT'][0]" ng-value="value" /><label style="text-align:left" >{{value}}</label>
</td>
</tr>
</tbody>
</table>
Type "Text", Text Type "Free Form" and Display Type "Text Area"
<li class="liExtProperty"><label >CLM_TEXT_FREFORM_TXTAREA:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CLM_TEXT_FREFORM_TXTAREA'][0]" />
</li>
Type "Text", Text Type "Free Form" and Display Type "Text Field"
<li class="liExtProperty"><label >CLM_TEXT_FREFORM_TXTFIELD:</label>
<input type='text' ng-model="formData.licenseCustomAttributes['CLM_TEXT_FREFORM_TXTFIELD'][0]" />
</li>
Type "Text" and Text Type "Multi-Valued Text"
<li class="liExtProperty"><label >CLM_TEXT_MULTI_VALUED_TXT:</label>
<table cellspacing="0" cellpadding="0" border="0">
<tbody><tr ng-repeat="value in selectedLicenseCustomAttributes['CLM_TEXT_MULTI_VALUED_TXT'].values">
<td valign="top" nowrap="true">
<input class="form" type='checkbox' ng-model="value.checked" />
<label style="text-align:left" >{{value.val}}</label>
</td>
</tr>
</tbody>
</table>
</li>
See Also