Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Editable form fields? Reply To: Editable form fields?

#171378
__
Participant

crap… I just spent an hour on a response and then spelled “jQuery” with ctrl+q instead of shift+q.

You’re going to need to make some organizational changes for your code. For example, the PHP that you use to INSERT to the database is wrapped up with your HTML output —which makes it difficult to access it via AJAX. This is analogous to the problems with “inline” javascript: it’s easy to write, but it only works in one way, in one particular process. Instead, you need a plugin, in an external file. So, we should take all of your PHP that “does stuff” and put them into functions that can be called selectively.

On the front-end of things, you’re going to need a way for javascript to actually retrieve the values you want to send in the ajax call.

To get us on the same page, are we talking about updating old data, inserting new data, or both?

Let me type up some things. I’ll post again soon.