Published on
In this tutorial, we will display how to create an edit or view link in our list.
Let's start by the view link, we will setup our Article's title as the view link, so we should add "Article.title" to the "View linkable" box.

Now let's go to the "actions" tab and enter the code to be processed in the "view" page, we will enter some simple code, we may use the curly brackets formula here, we are going to display the Article's introtext, using this code: {Article.introtext}

Now we need to setup our permissions, its allowed for public.

Here is how our new list looks like.

And here is what we have after clicking any of the links.

Now let's create an "edit" view, same steps, we could add another field name to the "Edit linkable", but instead, we can use the "_EDIT_" short code, we should add it to the "Columns list".

We should now add the code to our "edit" page, we may also use a Chronoforms v5 event, but we will cover the 2nd option in the next tutorial.
Our code can be simple HTML code of the fields we need to edit, fields names should start with the Model's title, and there should be a hidden field pointing to the table's primary key, otherwise new records will be created instead of updating existing ones.

We should again setup the permissions, this time for the "edit" action which is executed when we click the "edit" link, and another time for the "save" action which is executed when we submit the edit form.


Here is our new list.

By clicking the edit link and updating the form, we should get the list updated.

Comments: