I've read the manual and followed all instructions, but it doesn't work :(
The data does get printed inside the hidden input (not hidden in the code for testing purpose). However, when i submit the form and try to var_dump the POST values, i can't see the tags from the hidden field.
I added another text field named "test" with the string "it works". This field does get POST'ed and appears in the var_dump ... But not the hidden field !
Here's my code:
<?php
$http = "https";
$domain = "ni-dieu-ni-maitre.com";
echo "<script type=\"text/javascript\" src=\"https://www.ni-dieu-ni-maitre.com/scripts/jquery-1.8.2.min.js\"></script>
<link rel=\"stylesheet\" href=\"$http://www.$domain/scripts/css/textext.core.css\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"$http://www.$domain/scripts/css/textext.plugin.tags.css\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"$http://www.$domain/scripts/css/textext.plugin.autocomplete.css\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"$http://www.$domain/scripts/css/textext.plugin.focus.css\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"$http://www.$domain/scripts/css/textext.plugin.prompt.css\" type=\"text/css\" />
<link rel=\"stylesheet\" href=\"$http://www.$domain/scripts/css/textext.plugin.arrow.css\" type=\"text/css\" />
<script src=\"$http://www.$domain/scripts/js/textext.core.js\" type=\"text/javascript\" charset=\"utf-8\"></script>
<script src=\"$http://www.$domain/scripts/js/textext.plugin.tags.js\" type=\"text/javascript\" charset=\"utf-8\"></script>
<script src=\"$http://www.$domain/scripts/js/textext.plugin.autocomplete.js\" type=\"text/javascript\" charset=\"utf-8\"></script>
<script src=\"$http://www.$domain/scripts/js/textext.plugin.suggestions.js\" type=\"text/javascript\" charset=\"utf-8\"></script>
<script src=\"$http://www.$domain/scripts/js/textext.plugin.filter.js\" type=\"text/javascript\" charset=\"utf-8\"></script>
<script src=\"$http://www.$domain/scripts/js/textext.plugin.focus.js\" type=\"text/javascript\" charset=\"utf-8\"></script>
<script src=\"$http://www.$domain/scripts/js/textext.plugin.prompt.js\" type=\"text/javascript\" charset=\"utf-8\"></script>
<script src=\"$http://www.$domain/scripts/js/textext.plugin.ajax.js\" type=\"text/javascript\" charset=\"utf-8\"></script>
<script src=\"$http://www.$domain/scripts/js/textext.plugin.arrow.js\" type=\"text/javascript\" charset=\"utf-8\"></script>";
echo "<textarea id=\"textarea\" rows=\"1\" style=\"width:500px\"></textarea>
<form action=\"test.php\" method=\"POST\" id=\"tags_form\">
<script type=\"text/javascript\">
$('#textarea').textext({
html: {
hidden: ('<input type=\"text\" name=\"tags\" style=\"position:relative; top:50px;\"/>')
},
plugins : 'tags prompt focus autocomplete ajax arrow',
tagsItems : [ 'Basic', 'JavaScript', 'PHP', 'Scala' ],
prompt : 'Add one...',
ajax : {
url : '$http://www.$domain/scripts/data.json',
dataType : 'json',
cacheResults : true
}
});
</script>
<br><br><br><input type=\"text\" name=\"test\" value=\"it works\">
<button type=\"submit\" form=\"tags_form\" value=\"Submit\">Submit</button>
</form>
";
echo "<br><br><br><br><br><br><br>";
print_r($_POST);
var_dump($_POST);
?>