Create Element Block

Create an element and insert it into the page.

  • Element selector
    The element selector of the targeted element.

  • Insert element
    Representing the position relative to the targeted element.

    • As first child
      Insert it as the first child of the targeted element.

    • As last child
      Insert it as the last child of the targeted element.

    • As previous sibling
      Insert it as the previous sibling of the targeted element.

    • As next sibling
      Insert it as the next sibling of the targeted element.

    • Replace target element
      Replace the target element with the element that has been created.

  • HTML
    The HTML of the element that you want to create

  • CSS
    The CSS that will be injected into the page

  • JavaScript
    The JavaScript that will be injected into the page

    • automaRefData(keyword, path?) function
      Use this function to reference data.
      For more detail open the Javascript Block page

    • automaExecWorkflow(detail) function
      Function for executing a workflow.
      The detail parameter is where you input the detail of the workflow like the id or publicId of the workflow you want to execute. For example,

      // execute workflow based on its id
      automaExecWorkflow({ id: 'workflow-id' });
      
      // execute workflow based on its publicId
      automaExecWorkflow({ publicId: 'workflow-public-id' });
      

      You can also input variables that will be injected into the workflow when it's running.

      automaExecWorkflow({
      	id: 'workflow-id',
      	data: {
      		variables: {
      			varA: 'Variable A value',
      			postCode: 1212,
      			numbers: [1, 2, 3, 4],
      		}
      	}
      })
      
  • Preload script
    Load scripts or styles before injecting the element.