Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: spanish calendar for multilingual website #7151
    polanko
    Participant

    Perfect ; )
    Thanks a lot!!

    in reply to: spanish calendar for multilingual website #7134
    polanko
    Participant

    Hi,

    That works pretty well for the datepicker, thanks a lot!

    ¿What about the dropdown “month”?

    Regards

    in reply to: Time – Required fields don't work #4430
    polanko
    Participant

    Cool ; )

    in reply to: Time – Required fields don't work #4385
    polanko
    Participant

    Got it!!

    I had an obvious php syntax problem that I solved this way:


    add_action('iphorm_pre_display_4', 'mytheme_fix_time', 10, 1);

    function mytheme_fix_time($form)
    {
    // Sets the default time to HH:MM
    $time = $form->getElement('iphorm_4_21');
    $time->setValue(array('hour' => '', 'minute' => '', 'ampm' => 'am'));
    $time = $form->getElement('iphorm_4_22');
    $time->setValue(array('hour' => '', 'minute' => '', 'ampm' => 'am'));

    }

    add_action('iphorm_element_valid_iphorm_4_21', 'mytheme_validate_time', 10, 3);
    add_action('iphorm_element_valid_iphorm_4_22', 'mytheme_validate_time', 10, 3);

    I don’t know It’s the best way but It works.
    Thanks again for your awesome support.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Time – Required fields don't work #4384
    polanko
    Participant

    Great! Now time elements work exactly like I want. Thank you!!

    I have 2 time elements (start time and end time).
    So I have two “Time element unique ID”
    ¿How should I code that?


    function mytheme_fix_time($form)
    {
    // Sets the default time to HH:MM
    $time = $form->getElement('iphorm_1_11');
    $time->setValue(array('hour' => '', 'minute' => '', 'ampm' => 'am'));

    }

    add_action('iphorm_element_valid_iphorm_1_11', 'mytheme_validate_time', 10, 3);

    Imagine both cases:
    $time = $form->getElement(‘iphorm_1_11’); >>>>> & iphorm_1_12
    add_action(‘iphorm_element_valid_iphorm_1_11’, ‘mytheme_validate_time’, 10, 3); >>>>> & iphorm_1_12

    Thank you so much!!

    in reply to: Time – Required fields don't work #4369
    polanko
    Participant

    Hi Ally,

    The hour validation works fine, but the minute one does not work.

    In fact, you can set the time this way: “23:MM” and submit the form successfully.
    But when you don’t set the minutes (and leave MM), something sets them randomly and also breaks the hour previously set)

    So, the “23:MM” submitted could become “9:22” (?) in the email you received.

    Thanks.

    in reply to: Time – Required fields don't work #4354
    polanko
    Participant

    Thanks again.

    Now, HH&MM values appear fixed in drop-down. That’s great.
    But some problem remains the same, Quform takes those values (HH&MM) and when you submit the form, It doesn’t require real time values.

    Please, take a look at the attached image.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Time – Required fields don't work #4336
    polanko
    Participant

    Thanks ; )

    Now, I can view the HH&MM in the drop-down list, but It’s not possible to set it like the default value (via Form builder UI).

    I tryed the following code but It didn’t work.

    <option value="" selected>MM</option>

Viewing 8 posts - 1 through 8 (of 8 total)
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy