TEMA:

Sum attached files sent 2 años 3 semanas antes #263160

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderador
  • Moderador
  • Registered
  • Mensajes: 12079
  • Gracias recibidas: 788
Hi again,

please in End Submi pieces add this:
$this->execPieceByName('ff_InitLib');
$session = JFactory::getSession();
$files = glob('media/breezingforms/uploads/yourfolder/*''); // get all file names who should be saved in that path, * represent all in that folder
$filecount = 0;
if ($files){
 $filecount = count($files);
}
$session->set('count', $filecount);

In Before form pieces add this:
$session = JFactory::getSession();    
if (JRequest::getInt('ff_status', -1) == 0) {
$count = $session->get('count');    
echo 'Number of files is: '.$count;
}

Hope this helps

Regards,
Tihana
El siguiente usuario dijo gracias: Luisserafim

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Sum attached files sent 2 años 3 semanas antes #263163

  • Avatar de Luisserafim Autor del tema
  • Luisserafim
  • Fuera de línea
  • Navegador Experto
  • Navegador Experto
  • Registered
  • Mensajes: 286
  • Gracias recibidas: 1
Hi Tihana

Can you change "yourfolder" with "formid"?

Remember your last help?:

go to form advance properties > more options > Form pieces > Before Form and copy this code :
$this->execPieceByName('ff_InitLib');
$db = JFactory::getDbo();
$db->setQuery("Select Max(id) From #__facileforms_records");
$next_record_id = intval($db->loadResult()) + 1;
ff_setValue('formid', $next_record_id); //  "formid" is element name in which you want to display the record id

crosstec.org/en/forums/coding-consultanc...ication.html?start=0

tx in advance

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Última Edición: Post by Luisserafim.

Sum attached files sent 2 años 3 semanas antes #263164

  • Avatar de tihana.krivic
  • tihana.krivic
  • Fuera de línea
  • Moderador
  • Moderador
  • Registered
  • Mensajes: 12079
  • Gracias recibidas: 788
Hmmm....
it is a little hard in this way.

Please give me some time, I will try to find an alternative

Regards,
Tihana

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

  • Página:
  • 1
  • 2
Tiempo de carga de la página: 0.053 segundos

Live Support Chat Opened!

Join our Discord chat here and enter the Crosstec channels to receive live support and talk directly to the team!