How to float button next to field entry?

How to float button next to field entry?

loukinglouking Posts: 259Questions: 52Answers: 0

I am considering an optional button, determination whether to add depends on my data, to be displayed within an Editor create / update form next to the text box for a field

I see https://datatables.net/forums/discussion/31340/hei-change-the-buttons-position for dataTables in general which gives hints how this can be styled

Should I be using field() to get the instance for the desired field, and add my own button outside of Editor api, or is there support for this behavior directly within the Editor api?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Answer ✓

    There are two options:

    1. If this is a one off, use field().input() to get a reference to the input element for the field in question and then use jQuery to simply insert your button immediately after it.
    2. If you are going to use this in two or more places, I'd suggest creating a custom field type which adds the button.

    Allan

This discussion has been closed.