Quote from: landonpoburan at Oct 23, 2010, 07:03 PM
Quote from: BobRay at Oct 23, 2010, 06:48 PM
Sorry, I didn’t notice this at first. You can’t use MODx tags in a snippet. You’d want something like:
$emerald = $emerald_hereabout
Ok but how do I get the value of [[*emerald_hearabout]] in that variable?
If it’s the name of an input field and the form’s method is "post" it should be in $_POST[’emerald_hearabout’].
[[!ConvertTv? &tvValue=`[[*emerald_hearabout]]`]]
return print_r($tvValue,true);

/* handles checkboxes & multiple selects elements */
if (is_array($value)) {
$featureInsert = array();
while (list($featureValue, $featureItem) = each($value)) {
$featureInsert[count($featureInsert)] = $featureItem;
}
$value = implode('||',$featureInsert);
}
Added this to formit2resource to store values of checkboxes correct:
/* handles checkboxes & multiple selects elements */ if (is_array($value)) { $featureInsert = array(); while (list($featureValue, $featureItem) = each($value)) { $featureInsert[count($featureInsert)] = $featureItem; } $value = implode('||',$featureInsert); }
I hope this helps.
See the link in my Signature
what is, when you try it without custom-hooks?
Did you read the formit-docu and tried that example?
You can start with the formit-example.
Then change the form in small steps and add the hooks to see where the issues come from.
Then perhaps you have to debug formit2resource to see what goes wrong.
you can try to add alias-handling from /core/model/modx/processors/resource/update.php
$doc->set('alias', $id);
if you mean with resource-alias the field alias try:
$doc->set('alias', $id);