开发者

tokenizing a metafield

I am working with a CMS like system, which has a special field defined for use in its forms.

This field works similarly to google suggest, executing an sql query behind the scenes and displaying results.

The SQL query I am using selects 3 fields from table1, and concatenates them as a result.

What I need to do, is split this new metafield back into 3 distinct fields, so I can insert them into table2 along with the rest of the form.

How would I go about doing this normally in PHP? Javascript? Inbuilt PHP functionality?

I do wonder how much leeway I have as I am开发者_C百科 using provided input fields, not standard input fields.


So your problem is that you want the "autocomplete" field to automatically fill out the form with the values of the fields when selected? If so, you probably either need to change the separator to something that can be easily split using Javascript (such as "|") or modify the SQL query and PHP code to ouput the 3 fields separately as well. This may be harder if you haven't written the autocomplete code yourself

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜