TOPIC:

attachments effective identification 3 weeks 1 day ago #263009

  • Luisserafim's Avatar Topic Author
  • Luisserafim
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 201
  • Thanks: 1
Hi.

I'm wondering if it's possible to adapt the file name of the attachment since we have a form with more than 70 attachments and it's very difficult to identify them.

What is intended is something like:

Formid_section_fieldname_bscode.pdf/jpg...

Or another kind of effective identification

Thanks in advance

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

attachments effective identification 3 weeks 1 day ago #263010

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

you want to rename those attachments on upload? Am I right?

Would it help to create a folder based on the date where the file will be stored into?
If yes, then you achieve this using this:
crosstec.org/en/support/online-documenta...fferent-folders.html

Regards,
Tihana
The following user(s) said Thank You: Luisserafim

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

Last edit: Post by tihana.krivic. Reason: added more info

attachments effective identification 3 weeks 1 day ago #263011

  • Luisserafim's Avatar Topic Author
  • Luisserafim
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 201
  • Thanks: 1
Hi Tihana.

Yes ,rename attachments on upload.

And, Yes it help's to create a folder based on the record_id.

File name must have the Record_id and the Fieldname.

On Uploads with dynamic names and folders I didn't see record_id or {FIELDNAME:value} for filesrename.

Can we add It? or resolve otherwise?

Tx in advance

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

attachments effective identification 3 weeks 1 day ago #263013

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

it can be like this:
{filemask:fieldname} 
where fieldname is name of field.

E.g. record_id can be stored in field and than based on that field use filemask.

Regards,
Tihana
The following user(s) said Thank You: Luisserafim

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

attachments effective identification 3 weeks 1 day ago #263021

  • Luisserafim's Avatar Topic Author
  • Luisserafim
  • Offline
  • Expert Breezer
  • Expert Breezer
  • Posts: 201
  • Thanks: 1
Hi Tihana.

And can we mix them thogeter?

Like this?

{ff_uploads}/{record_id}/{date}
/path/to/site/media/breezingforms/uploads/953/2021-08-30/
+
{filemask:_record_id}{filemask:_doce1}{filemask:_fc1a}
953_doce1_fcla.pdf

and get:
{ff_uploads}/{record_id}/{date}{filemask:_record_id}{filemask:_doce1}{filemask:_fc1a}
/path/to/site/media/breezingforms/uploads/953/2021-08-30/953_doce1_fcla.pdf

Tx in advance

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

attachments effective identification 3 weeks 1 day ago #263022

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

yes, you can mix it.

But to get record id:
1) create new textfield element in your form and give it name "formid"
2) 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

Now since you have your field formid populated with record ID you can us this mask (something like this) :
{ff_uploads}/{formid:value}|{filemask:formid}{filemask:_separator}{filemask:_doce1}{filemask:_fc1a}

Please let me know the result

Regards,
Tihana
The following user(s) said Thank You: Luisserafim

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

Last edit: Post by tihana.krivic.
  • Page:
  • 1
  • 2
Time to create page: 0.051 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!