30
Views
4
Comments
How to change the index of an sorted item using Sortable AF
Question

Hi,

I have a field where I can put a number then xhen I click on the "click here to add text field" btn, it generates the asked fields as shown here :

I have a this struture which contain he index of the fields generated and value and id:

now my problem is when  change the index of the text field(I change the position by Drag the items because I'm using Sortable AF) I want to update the indexes in my list.

here's the .oml

could you help please

Testdemo.oml
UserImage.jpg
Sumit Kanojia

hi @you asen ,

please check the file , 

so you want this?

regards,

Sumit

Testdemonew.oml
UserImage.jpg
you asen

why you removed the sortable AF ?

2024-05-22 06-12-56
Vignesh Prakash

Hi @you asen

You can utilise the change event of the Sortable\SortableList to update the index of the list.

You will receive both the old index and New index value on the input parameter.

Hope this helps.

Thanks,
Vignesh Prakash.

UserImage.jpg
you asen

Yes I know this option but I have no idea how to update the list with the right index, could you help please ?

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.