Complex form template

Complex form template

ralfeusralfeus Posts: 24Questions: 6Answers: 1

Hi all,
I tried to play with Editor form template in order to introduce an additional input, which isn't a field. So I want to have an input right besides my field. But because the editor-field renders to div next element appears on the next line (example is here: http://live.datatables.net/foyuzuvo/1)

Is there any way to bind field to an input?

Replies

  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    What you want to do here is, rather than include it in your template, inject it into your field's node:

      $('<input id="color-text" />')
        .insertAfter( $('input', editor.field('color').node()) );
    

    http://live.datatables.net/foyuzuvo/2/edit

    You'll need to add a bit of CSS to make it a bit more attractive though... :).

    Allan

This discussion has been closed.