hi there
i am almost there with my site, and i would like to thank you for your superb support along the way, the site is semi live, http://www.french-property-advertising.com – i use your great form plugin for testimonials, contact us, blog posting, creating a property ad, editing the entries, simply superb, and if you ever need a testimonial I am more than happy to give one as this wouldnt be possible for me without your great app and support.
anyway, my little problem.
when a new property ad is posted the status is draft, as i want our team to have editorial review before things go live.
once we have changed status from draft to publish I would like the select list in the form to be available to the user to ‘pause’ their ad (by changing back to draft (pending sale etc))
i use this code
add_filter(‘frm_setup_edit_fields_vars’, ‘frm_add_private’, 20, 2);
function frm_add_private($values, $field){
if($values['post_field'] == ‘post_status’){
unset($values['options']['private']);
unset($values['options']['pending']);
$values['options']['draft'] = ‘Paused/Not visible’;
$values['options']['publish'] = ‘Published/Live’;
}
return $values;
}
and whilst i control what is in the status select list and unset values on form adding, so the only option is “pending approvsal”, if they then submit then come back in on edit mode they get to self publish.
i need to hide the select list until the ad has been at least approved once, once its been approved i would like themto be able to set back to draft (to pause) and then back to pulish if the sale falls through.
does that make sense?
hope you can help, soooo close now.
Thanks
Darren




May 15, 2012 at 3:16 pm
You would need more conditional logic before adding the 'publish' option. You'll need to fine tune on your own to get it to show at the right times.
if($values['value'] == 'publish')
$values['options']['publish'] = 'Published/Live';
Topic closed.