Problem with Upload link.

Home Forums Quform WordPress Problem with Upload link.

This topic is: not resolved
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #9024
    morarioan
    Participant

    Hy,
    I made some php code to inserd new fields in user profile. So all my fields from my webform ( http://jnyhost.com/dlh/11-2 ) have also field in User profile. I want to take also link from upload files.

    Here is my code:

    function modify_contact_methods($profile_fields) {

    // Add new fields
    $profile_fields[‘company_name’] = ‘Company Name’;
    $profile_fields[‘additional_name’] = ‘Additional Name’;
    $profile_fields[‘main_contact’] = ‘Main Contact’;
    $profile_fields[‘phone’] = ‘Main Contact Phone Number’;
    $profile_fields[‘docket’] = ‘Docket#’;
    $profile_fields[‘dot’] = ‘DOT#’;
    $profile_fields[‘year_in_business’] = ‘#Year in Business’;
    $profile_fields[‘physical_address’] = ‘Main Office: Physical Address’;
    $profile_fields[‘city’] = ‘City’;
    $profile_fields[‘state’] = ‘State/Province’;
    $profile_fields[‘postal_code’] = ‘Postal Code’;
    $profile_fields[‘organization_type’] = ‘Organization Type’;
    $profile_fields[‘q1’] = ‘Do you use owner-operators?’;
    $profile_fields[‘q2’] = ‘Does your Automobile Liability insurance cover the owner-ops?’;
    $profile_fields[‘q3’] = ‘Does your Cargo insurance cover the owner-ops?’;
    $profile_fields[‘other_text’] = ‘Other’;
    $profile_fields[‘q4’] = ‘Are you a Certified Minority-Owned Business Enterprise?’;
    $profile_fields[‘q5’] = ‘Are you a Certified Women-Owned Business Enterprise?’;
    $profile_fields[‘upl’] = ‘Upl’;

    return $profile_fields;
    }
    add_filter(‘user_contactmethods’, ‘modify_contact_methods’);

    function mytheme_check_username_exists($valid, $value, $element)
    {
    if (username_exists($value)) {
    $element->addError(‘This username is already taken’);
    $valid = false;
    }

    return $valid;
    }
    add_filter(‘iphorm_element_valid_iphorm_1_3’, ‘mytheme_check_username_exists’, 10, 3);
    function mytheme_check_email_exists($valid, $value, $element)
    {
    if (email_exists($value)) {
    $element->addError(‘This email address is already registered’);
    $valid = false;
    }

    return $valid;
    }
    add_filter(‘iphorm_element_valid_iphorm_1_49’, ‘mytheme_check_email_exists’, 10, 3);
    function mytheme_register_wp_user($form)
    {
    $username = $form->getValue(‘iphorm_1_49’);
    $email = $form->getValue(‘iphorm_1_49’);
    $password = $form->getValue(‘iphorm_1_53’);
    $company_name = $form-> getValue(‘iphorm_1_3’);
    $additional_name = $form-> getValue(‘iphorm_1_4’);
    $main_contact = $form-> getValue(‘iphorm_1_5’);
    $phone = $form-> getValue(‘iphorm_1_47’);
    $docket = $form-> getValue(‘iphorm_1_9’);
    $dot = $form-> getValue(‘iphorm_1_10’);
    $year_in_business = $form-> getValue(‘iphorm_1_11’);
    $physical_address = $form-> getValue(‘iphorm_1_12’);
    $city = $form-> getValue(‘iphorm_1_15’);
    $state = $form-> getValue(‘iphorm_1_50’);
    $postal_code = $form-> getValue(‘iphorm_1_17’);
    $organization_type = $form-> getValue(‘iphorm_1_19’);
    $q1 = $form-> getValue(‘iphorm_1_26’);
    $q2 = $form-> getValue(‘iphorm_1_27’);
    $q3 = $form-> getValue(‘iphorm_1_28’);
    $other_text = $form-> getValue(‘iphorm_1_29’);
    $q4 = $form-> getValue(‘iphorm_1_30’);
    $q5 = $form-> getValue(‘iphorm_1_32’);
    $upl = $form-> getValue(‘iphorm_1_44’);
    wp_insert_user(array(
    ‘user_login’ => $username,
    ‘user_pass’ => $password,
    ‘user_email’ => $email,
    ‘company_name’ => $company_name,
    ‘additional_name’ => $additional_name,
    ‘main_contact’ => $main_contact,
    ‘phone’ => $phone,
    ‘docket’ => $docket,
    ‘dot’ => $dot,
    ‘year_in_business’ => $year_in_business,
    ‘physical_address’ => $physical_address,
    ‘city’ => $city,
    ‘state’ => $state,
    ‘postal_code’ => $postal_code,
    ‘organization_type’ => $organization_type,
    ‘q1’ => $q1,
    ‘q2’ => $q2,
    ‘q3’ => $q3,
    ‘other_text’ => $other_text,
    ‘q4’ => $q4,
    ‘q5’ => $q5,
    ‘upl’ => $upl

    ));
    }
    add_action(‘iphorm_post_process_1’, ‘mytheme_register_wp_user’, 10, 1);

    But for “Upl” is empty. How can I save link from upload files??

    Attachments:
    You must be logged in to view attached files.
    #9044
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

    #9058
    morarioan
    Participant

    When I have multiple Upload?

    #9059
    morarioan
    Participant

    for example I have multiple upload set to 5 files.

    #9063
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy