Forums

Multi-Upload Widget & Date-Time Picker

Natasacy 08 May, 2013
Hello all,

I am using Joomla! 2.5.11 and Chronoforms 4.0 RC3.5.2.

I am trying to build a form and I am facing the following issues:

A) Multi-Upload Widget:

1) The option "Hide Label" does not work for this widget. I have ticked the "Hide Label" option in element's properties but it still showing on the front end.

2) The file limit doesn't seem to get fixed. I have set the limit to 5. If a user loads 5 files but he removes one box by clicking on remove image, he should have the ability to add another box by clicking on "Attach File" link and have the chance to load another file again, right? This doesn't happen though..

3) Question: Is there any way to change the inline padding of the link "Attach File"? I am using firebug and I can see that the inline padding is 150px. I can't see the link "Attach File" in order to translate it and change the padding in the form's code. I can only see the "<?php echo HTML_ChronoForms::loadWidget($form, 'multi_upload', array ( ..."
Can I find it in a different file / location?


B] Date Time Picker

1) The user must specify a deadline and has to choose the date and the time. When he selects a date from the popup calendar, then another box appears where he can pick the time. After he clicks on any point of the time-popup box, the selected date changes to the date that is below that specific point. Shouldn't the calendar be disabled after the appearance of the time popup box?


Thank you in advance

--
Natasa
GreyHead 13 May, 2013
Hi Natasa,

You are right that the Label Hide does not work for the Widget; as a workaround you can leave the label box empty.

You are also right that the destroy function does not change the limit. Here's a hack to the filr /administrator/components/com_chronoforms/form_widgets/multi_upload/multi_upload.js that will fix that (it's rather crude JavaScript I'm afraid). Replace these lines:
MultiUpload.removeAttachment = function(source){
	source.getParent().destroy();
}
with
MultiUpload.removeAttachment = function(source){
	var limit = source.getParent().getParent().getParent().getFirst('.multi-upload-add-attachment-link').getFirst('.multi-upload-limit');
	limit.set('value', parseInt(limit.get('value')) - 1);
	source.getParent().destroy();
}

For the datepicker problem, this sounds like a problem that we’ve seen before where two datepickers load one on top of the other. Are you using the MooTools datepicker? If not please change the setting on the form General tab and see if that fixes the problem.

Bob
Natasacy 14 May, 2013
Hello Bob,

I followed your suggestions and everything works fine now! Thank you very much for your help!🙂

I have one last question about the multi-upload widget. I need to change the words' "Attach File" padding from 125px to 180px but I cannot find anywhere these words. As I can see from firebug the padding is an inline style. Can I do a hack for this since I have read that the words 'Attach File' are hard-coded into the widget?

--
Natasa
GreyHead 14 May, 2013
Hi Natasa,

Please see this post for a little JavaScript to change the 'Attach File" label.

Bob
This topic is locked and no more replies can be posted.