Support

Search results for ""

Sorry, no results found. Perhaps you would like to search the documentation?
All Topics
Joel Fuller

Showing inline values on page load

Hi,

I am wondering how to show the values of inline fields by default on page load.

We still want to be able to edit the inline fields as usual – with the “edit pencil” button… but also view the inline field on page load. This would help visually parse the information before having to click into each field to edit.

4 years, 5 months ago
Stefan van den Dungen Gronovius
Developer

I don’t fully understand your use case.
Is the information that is displayed in the column different than the information that you’re entering with inline editing?

The only way to change the value of a column is to use the following hook.
https://www.admincolumns.com/documentation/filter-reference/ac-column-value/

For inline edit we almost always use the raw value of the column which can be accessed by $column->get_raw_value( $id ) so you could alter the value and add this between parentheses after the original value.

4 years, 5 months ago
Joel Fuller

Hi Stefan,

I realise now I could of been more detailed. I am using the NinjaForms add-on to add inline editing to form submissions. I currently have these fields:

Aff Submissions Panel

What you see there is what we get on initial page load. For example, we add data to the “Site” column (2nd from last)…

which adds the data and saves it…

https://voyanceinsights-prod.s3-ap-southeast-2.amazonaws.com/share/aff-submissions-site-afterEdit.png

However after page load we get the following…

https://voyanceinsights-prod.s3-ap-southeast-2.amazonaws.com/share/aff-submissions-site-afterEdit-afterPageload.png

The data is saved and accessible after clicking the edit pencil again.

So we simply want to be able to view the data on page load (to be able to visually parse where the changes have been made).

4 years, 5 months ago
Stefan van den Dungen Gronovius
Developer

Thanks for the explanation.
It should work as you suggested and I don’t understand why the value does not show on a page load.
When you click on the edit button for the submission, do you see the changed value reflected on the edit page?
Just to be sure, is Site a simple test field?
And do you have the same issue for every field?

4 years, 5 months ago
Joel Fuller

Oh! Another crucial pattern I missed and have just noticed is that all the missing values on page load are ACF custom fields.

These ACF are part of a field group that are attached to submissions. They are used for admin only annotates to submissions.

4 years, 5 months ago
Stefan van den Dungen Gronovius
Developer

Ah ok, that was indeed some important information.
I did follow your steps and I was able to reproduce the issue.
After some debugging, I found something interesting.
Ninja Forms does not allow you to change any custom columns on the submission overview page.
Since they are in control of managing the column values on that view, there is not much we can do about that, unless they extend their method to determine the values on that overview. I will add a feature request for Ninja Forms and ask if they will add another hook that runs for every column on the overview. Until that is fixed, I’m afraid I don’t have a working solution or workaround for you.

4 years, 5 months ago

You must be logged in to reply to this topic.