Insert Elements

new Since 2019/10

You can now insert certain elements like headlines, paragraphs or alerts before or after any field or above or below the row.

Example

new AppGiniField("birth_date")
  .insertAbove()
    .h1("Heading 1", "page-header")

Position before/after or above/below

There are four diffent places:

  • .insertAbove() inserts the new element above the row,
  • .insertBelow() below the row
  • .insertBefore() inserts the new element above the input
  • .insertAfter() below the input
var field = new AppGiniField("weight");

field.insertAbove().h1("Heading 1");
field.insertBefore().h1("Heading 1");
field.insertAfter().h1("Heading 1");
field.insertBelow().h1("Heading 1");

Insert Heading

new AppGiniField("birth_date") .insertAbove() .h1(".h1 Heading 1", "page-header") .h2(".h2 Heading 2") .h3(".h3 Heading 3") .h4(".h4 Heading 4") .h5(".h5 Heading 5");

Read more ...

Insert Paragraph

var text = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et"; new AppGiniField("birth_date") .insertAbove() .p(text) .p(text, "lead") // css classname "lead" ;

Read more ...

Insert Alert

new AppGiniField("birth_date") .insertAbove() .alert(".alert(\"Text\", Variation.info)", Variation.info) .alert(".alert(\"Text\", Variation.success)", Variation.success) .alert(".alert(\"Text\", Variation.warning)", Variation.warning) .alert(".alert(\"Text\", Variation.danger)", Variation.danger);

Read more ...

Was this helpful?