TOPIC:

Submit content example not working with error 3 weeks 12 hours ago #250315

  • Topic Author
  • Bibbp
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 54
  • Thanks: 0
I am on 1.9.1 stable.

This is in the submit pieces of the form:

//+trace dis

// configuration variables
$moderate = 1; // 0 = publish directly, 1 = leave unpublished

// declare globals used in this piece
global $Itemid;

// load the standard piece library
$this->execPieceByName('ff_InitLib');

// get values from submission
$name = ff_getSubmit('name', '');
$title = ff_getSubmit('title', '');
$text = ff_getSubmit('text', '');
$section = ff_getSubmit('section', 0);
$category = ff_getSubmit('category', 0);

// get the userid of a superadministrator. the article will be created
// by the superadmin, but use as author alias the name of the person
// who submitted it.
$creator = ff_select("select id, email, sendEmail from #__users where gid=25");
$creator = $creator[0]; // take first row

// format text, date and state
$text = ff_markdown($text);
$date = date( "Y-m-d H:i:s" );
if ($moderate) $state = 0; else $state = 1;

// save new submission into #__content table
ff_query(
"insert into #__content ".
"(title, title_alias, introtext, state, sectionid, ".
"catid, created, created_by, created_by_alias) ".
"values ".
"('$title', '$title', '$text', '$state', '$section', ".
"'$category', '$date', '$creator->id', '$name')"
);

// get section and cat name
$section_name = ff_selectValue("select title from #__sections where id='$section'");
$cat_name = ff_selectValue("select title from #__categories where id='$category'");

// update #__messages table for backend notices
$subject = "New content submitted";
$message = "A new product was submitted by [$name] ".
"titled [$title] in section [$section_name] and category [$cat_name]";
ff_query(
"insert into #__messages (user_id_from, user_id_to, date_time, subject,message) ".
"values ('".JFactory::getUser()->get('id',0)."', '$creator->id', '$date', '$subject','$message')"
);

// send a mail notice to superadmin
if ($creator->sendEmail) {
// if sent by unregistred we dont know the email
if (JFactory::getUser()->get('id',0) != 0) $from = JFactory::getUser()->get('email',''); else $from = "somebody@unknown.com";
$this->sendMail(
$from, // senders email
$name, // senders name
$creator->email, // recipient email
$subject, // subject line
$message // the message
);
} // if

ff_redirectSelf("&ff_page=3"); // show thank you page

Please Log in or Create an account to join the conversation.

Submit content example not working with error 3 weeks 12 hours ago #250316

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 2202
  • Karma: 3
  • Thanks: 198
Hi,

okay, I am on this version too.
I check my tables in phpadmin, and there is no #__sections table that is created with BF.
Section title and section name are not in the database

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.

Submit content example not working with error 3 weeks 11 hours ago #250320

  • Topic Author
  • Bibbp
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 54
  • Thanks: 0
Unfortunately this is in one of the examples you ship with Breezing forms! Do you by any chance have another example by which users can provide some input data and upload a .jpg? My user wants artists to submit images for an on-line art exhibition... Thanks

Please Log in or Create an account to join the conversation.

Submit content example not working with error 3 weeks 10 hours ago #250321

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 2202
  • Karma: 3
  • Thanks: 198
Hi,

if I undestood you correctly, maybe this can help to you:
crosstec.org/en/support/online-documenta...udes-attachment.html


Regards,
Tihana

Please Log in or Create an account to join the conversation.

Last edit: Post by tihana.krivic.
  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.053 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!