If i want to have a field that can accept a text f...
# ask-stanley-ai
m
If i want to have a field that can accept a text field with HTML tags and preserve the format, what field type should i use?
c
AI generated answer (using internal Slack threads):
In NetSuite, if you want to have a field that can accept a text field with HTML tags and preserve the format, you should use the "Inline HTML" field type. This field type allows you to input HTML content and it will be rendered as HTML when the field is displayed. However, please note that the "Inline HTML" field type is not available in list views or search results. If you need to display HTML content in these contexts, you may need to use a "Formula (HTML)" field in a saved search or similar. Here is an example of how you can add an Inline HTML field to a form in a client script:
Copy code
javascript
function clientPageInit(type) {
    var form = nlapiGetWebContainer().getForm();
    var htmlField = form.addField('custpage_html', 'inlinehtml', 'HTML Field');
    htmlField.setDefaultValue('<b>This is some HTML content</b>');
}
In this example, a new Inline HTML field is added to the form with the id 'custpage_html'. The field is given a label of 'HTML Field' and a default value of '<b>This is some HTML content</b>', which will be displayed as bold text. ****** Disclaimer: This response was generated by an artificial intelligence assistant based on previous conversations from multiple Slack channels, and may contain inaccuracies or mistakes. ******
Slack thread 1: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.820684552
Slack thread 2: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815884709
Slack thread 3: here (available only if the original thread was posted in the last 90 days)
Similarity score: 0.815607667
Please provide your feedback on this answer.