How to add totally customized code for the doctype

Hi @bghayad:

Add an HTML field on your doctype. With client script (or .js file) “inject” content to the field with something like that:

html = '<table>
  <tr>
    <th>Company</th>
    <th>Contact</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Maria Anders</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial Moctezuma</td>
    <td>Francisco Chang</td>
    <td>Mexico</td>
  </tr>
</table>'

frm.fields_dict.your_html_field.html(html);

Check this for reference.

Hope this helps.

1 Like