This question has been answered by gallenkamp. See the first response.

<script>
$('#mycheckbox').click(function() {
$('#myinput').toggle();
});
</script><script>
$('#mycheckbox').click (function () {
var thisCheck = $(this);
if (thischeck.is (':checked')) {
$('#myinput').show();
}
});
</script>
I dont know if its too much to add jquery to the site, just to toggle an input field. Its not done with thaht, as I'll have to edit the formit2resources snippet alot.<?php
$doc = $modx->getObject('modResource',array('id'=>$hook->getValue('resource_id')));
if (empty($doc)){
$doc = $modx->newObject('modResource');
$doc->set('createdby', $modx->user->get('id'));
}
else{
$doc->set('editedby', $modx->user->get('id'));
}
$allFormFields = $hook->getValues();
foreach ($allFormFields as $field=>$value)
{
if ($field !== 'spam' && $field !== 'resource_id'){
$doc->set($field, $value);
}
}
/*---- edit ---*/
if ($hook->getValue('type')=='lauftreff') {
$doc->set('template', '2');
$fireTweet = true;
}
elseif ($hook->getValue('type')=='stadt') {
$doc->set('template', '3');
}
$doc->set('hidemenu', '0'); //hide from menu
$doc->set('published', '1'); //publicate at once
/*--- edit ---*/
$doc->save();
foreach ($allFormFields as $field=>$value)
{
if ($tv = $modx->getObject('modTemplateVar', array ('name'=>$field)))
{
/* handles checkboxes & multiple selects elements */
if (is_array($value)) {
$featureInsert = array();
while (list($featureValue, $featureItem) = each($value)) {
$featureInsert[count($featureInsert)] = $featureItem;
}
$value = implode('||',$featureInsert);
}
$tv->setValue($doc->get('id'), $value);
$tv->save();
}
}
if ($hook->getValue('type')=='lauftreff') {
$params['link'] = $modx->makeUrl($doc->get('id'));
$modx->runSnippet('tweetOnPublish', $params);
}
return true;$params['link'] = $modx->makeUrl($doc->get('id'));I dont know if its too much to add jquery to the site, just to toggle an input field.