Viewing 12 replies - 1 through 12 (of 12 total)
  • I am having the same problem om WordPress. Users cannot upload the files on registration.

    If an admin attaches a file from backend in extended profile, it is uploaded then.

    Could it be something related to subscriber not being able to upload?

    Thread Starter skigirl1369

    (@skigirl1369)

    Not quite the same problem.

    My issue is that I have a file upload field set as required. But users are able to submit the form without uploading a file

    I am having the exact same problem. Upload field is visible, users attaches file, submits the form, file doesn’t upload anywhere.

    @abhi9: If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else’s topic.

    Alright. Thank You. But the issue is same for both of us.

    These forums have guidelines. Please read them. As you will see, one of these guidelines – entitled Where to Post – specifically states:

    Unless you are using the same version of WordPress on the same physical server hosted by the same hosts with the same plugins, theme & configurations as the original poster, do not post in someone else’s thread. Start your own topic.

    Please abide by this.

    Great. Thank You for letting me know 🙂

    Thread Starter skigirl1369

    (@skigirl1369)

    It’s not the same issue, abhi9. My users are NOT uploading anything in the REQUIRED file field and the form is able to be submitted anyway. I need them to submit the file in order to submit the form or receive an error letting them know the file upload field is required. My issue has nothing to do with files being submitted but not available

    Same problem skigirl. Users are NOT uploading anything in the REQUIRED file field and the form is able to be submitted anyway

    Plugin Author Miguel López

    (@atallos)

    I don’t have this issue on my test site.

    Please give me access to your website and I can see what happens. You can send me an email if you don’t want to make it public.

    Thanks!

    I have a similar problem to skigirl1369.
    I was trying to find why, and I saw this lines:

    jQuery('input#field_<?php echo bp_get_the_profile_field_id(); ?>[type=file]').change(function() {
                        if (jQuery(this).val() !== '') {
                            jQuery('input#field_<?php echo bp_get_the_profile_field_id(); ?>[type=hidden]').val('-');
                        } else {
                            jQuery('input#field_<?php echo bp_get_the_profile_field_id(); ?>[type=hidden]').val('');
                        }
                    });

    From what I can understand, when the value of the input file changes (i.e. you choose a file on your computer), the hidden value is set to ‘-‘, otherwise (when? there’s no chance you can unset a chosen file…) it should be set to ”.

    Problem is, the hidden fields for every input type=”file” are *already* set to ‘-‘ when you load the form (I’m talking of a completely empty profile, fist time it’s edited). So if you submit the form without uploading any file, the hidden fields, that are checked by Buddypress, are posted with a value ‘-‘, so they are not empty and BP doesn’t return an error even if they are required.

    Shouldn’t empty files be set to ” (empty string) when building the form to be sent to the browser?

    Hey there,

    Just a thought on this… I just had a similar issue with dropdowns that were required but could be surpassed in registration form. Debugging this one and I realized that was a HTML compression script that I was using that caused the issue. I removed the script in registration page and requirements works as should be.

    Cheers,
    Dimitris

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘File upload fields set as required but are not’ is closed to new replies.