Creating a modal form field

From Joomla! Documentation

I think there is a small omission in the display of /administrator/components/com_library/views/books/tmpl/modal.php

There is no opening php tag at the top, ie '<?php'

One other thing: being a novice, I find that I am not clear on just what file the getInput method is supposed to be in. I'm guessing from the context that it belongs in the same file as described above the method, ie admin/models/fields/modal/book.php, but it would be nice if you make that clear.


"In theory, there's no difference between theory and practice; in practice, there is" --Yogi Berra 09:05, 9 December 2011 (CST)

May be an error with the line "if (($title = $db->loadResult()) === false) {"

I think there is an error with the line :

if (!$title = $db->loadResult()) {

Replacing it with the following line works for me :

if (($title = $db->loadResult()) === false) {

Because if there is no result in the result of $db->loadResult(), the statement will return false, an an error is raised