This topic is locked

Autocomplete in 3.1

12/7/2006 9:22:22 AM
PHPRunner General questions
M
markdorminy author

It was easy in 3.0... just plain ol' php, but with the new functionality of 3.1, I'm lost.
Thanks!

MD

J
Jane 12/7/2006

Hi,
I'm not sure that I understand you correctly.
Please give me more detailed description of what you done in the PHPRunner 3.0 and I'll help you to do the same in the PHPRunner 3.1.

M
markdorminy author 12/7/2006

Sure... I have a php routine that preloads an array of names and then a javascript routine that does partial name matching. Adding this as an after-the-fact routine was easy in 3.0, but with all the new templates and compiled templates and smarty functions, I have no idea how to do this in 3.1... and the user base is steadily knocking on my door for it.
Thanks!!!

MD

G
GeddyLee 12/7/2006

Sure... I have a php routine that preloads an array of names and then a javascript routine that does partial name matching. Adding this as an after-the-fact routine was easy in 3.0, but with all the new templates and compiled templates and smarty functions, I have no idea how to do this in 3.1... and the user base is steadily knocking on my door for it.

Thanks!!!

MD


I'm guessing here, but doing it as hard as I can.
Is this something you could put in a header.php or footer.php in the include folder? These are (amazingly enough) included in the page either at the start or end of the page. If you check the html from the visual editor, you see that in the header and footer of every page it includes files named header.php and footer.php if they exist.
Dunno if that will do it, I'm still new with php, and I don't know if I was being clear enough. If it doesn't help just ignore me, I won't be offended.
-Brent

M
markdorminy author 12/12/2006

I don't think that will work, actually, but it's a good guess. I guess that my question is where do I put the javascript to call the autocomplete function? As a custom code element from the visual editor? In one of the html templates? In the _add php file? Too many choices!

L
lawfour 12/12/2006

It was easy in 3.0... just plain ol' php, but with the new functionality of 3.1, I'm lost.

Thanks!

MD


This is the thread location of my question on auto complete forms http://www.asprunner.com/forums/index.php?showtopic=3909

View to see if it is what you are looking for.
Try this
open Visual editor and put this code in the default fields I am using my fields you can change to yours
Investigator
@$_SESSION["Investigator"]
Room:
QUOTE

@$_SESSION["Room"]
etc
Then put this code to After successful login event.
QUOTE

global $data;

$_SESSION["Investigator"] = $data["Investigator"];

$_SESSION["Room"] = $data["Room"];

...
where Investigator and Room are your actual field names in Users table.

Note that field names are case-sensitive here.

M
markdorminy author 12/15/2006

Thanks for the help, but it's not exactly the problem I'm trying to solve! I'm trying to autocomplete a field, not an entire form. If a user types "S" in a name field, all the "S's" will appear. If the user then types "m", it narrows the field to names starting with "Sm" etc.

Sergey Kornilov admin 12/15/2006

We plan to add this feature next year. This will be a AJAX-based autocomplete, that don't need preloading.
Meanwhile I can help you to port your autocomplete code from version 3.0 to 3.1.

Contact me directly at support@xlinesoft.com with old and new project code.