I was following the instructions here on defining new input types for Semantic Forms:
Those instructions state:
Users reported issues where they would sometimes see the word "Array" pop up in place of the form field, which led me to put some debug statements into Semantic Forms to figure out what was happening (after ensuring that I was, in fact, returning what the docs said to return) - according to my debug statements, returning an array from the function in question is NOT correct. Every other return value I saw coming out of that function contained only the HTML for the form field, not an array with two elements (and I was doing a print_r, so that hopefully would've caught any actual array value returns).
I would note, though, that the array() return value worked in some cases but not others - if I kept the return value of the function as:
return array($html, null);
where $html is non-empty, the field would function for me across several computers, browser sessions, etc., but other users reported the same "Array" statement sometimes being printed. However, replacing that with:
appears to work everywhere.
I wanted to flag this, since it seems like an inaccuracy in the documentation itself (if it's not some sort of strange processing bug with Semantic Forms) - once I changed the code to only return the HTML, my test user stopped reporting the issue. This was with Semantic Forms 2.1.2. Is what I observed actually what should be happening?
Knowledge Discovery and Informatics
Pacific Northwest National Laboratory
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
Semediawiki-devel mailing list