Skip to content

Instantly share code, notes, and snippets.

@sorenmalling
Created March 29, 2013 21:18
Show Gist options
  • Save sorenmalling/5273706 to your computer and use it in GitHub Desktop.
Save sorenmalling/5273706 to your computer and use it in GitHub Desktop.
<form action="save.php" method="POST">
<input type="hidden" name="element-uid" value="[tt_content_uid]" />
<textarea>Here goes comment - this could be a RTE</textarea>
</form>
<a href="#" onclick="openNoteForm">Open note form</a>
<script>
function openNoteForm(element) {
jQuery('#formid').show() <<-- here, do some magic that makes sense: Show the form (form.html) set the value of the hidden field to the current tt_content element
}
</script>
<?php
$sql = 'INSERT INTO `table` SET note = "' . $notecontent . '" element = "' . $tt_content_uid . '" fe_user = "' . $this->getCurrentUserSession() . '"';
functon getCurretUserSession() {
return $GLOBALS['TSFE']->fe_user # and maybe some more..
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment