Does editor support a select type when using a VIEW?

Does editor support a select type when using a VIEW?

th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

I'm following the example here, https://editor.datatables.net/examples/advanced/sqlView

But editor only populates the text field and not the select fields when editing. When creating a new entry nothing is populated. Is a select (dropdown) supported in Editor when using SQL Views?

Replies

  • allanallan Posts: 61,650Questions: 1Answers: 10,094 Site admin

    Yes, you'd use an Options class attached to the Field. Its not the leftJoin in Editor that tells it what the options should be but rather than Options class attached to the field you want to have options for.

    Allan

  • th3t1ckth3t1ck Posts: 228Questions: 37Answers: 1

    I couldn't quite figure out the correct syntax to use for a ->readtable to work correctly. I could get the table to display correctly but failed miserably when trying to get a select to populate for editor. I used an Mjoin with a view table instead and it's working the way I was hoping.

This discussion has been closed.