HTTP Links doesnt work on single/paragraph fields

Home Forums Quform WordPress HTTP Links doesnt work on single/paragraph fields

This topic is: resolved
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #11616
    spelorzi
    Participant

    Hi, i have a field that the user needs to put a link, if he uses http://www.xxxxx.com the form will not work/submit data, if he removes http:// it does work… any idea how can i fix this?

    And secondly, i’m trying to redirect the user upon submit to hes newly created form, but this page/link has a custom uniqueid, how can i make this redirection?…

    Sorry for my bad english! i also sent you this info by email.

    Thanks!

    S.

    #11634
    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.

    #11646
    spelorzi
    Participant

    The redirection code worked perfectly, thanks

    On the http problem, you are right, it does have mod_Security on the host side. i prefer to leave it that way.

    But, is there a way to detect if the user puts a link with HTTP:// and remove it when he clicks submit, or at least alert him when he types it on the field in the form?

    Thanks Ally!

    #11657
    josef777
    Participant

    You can use the Description or the tooltip to inform the user not to use http:// but is you want to use javascript just add a HTML field and put the following in it


    <script>
    jQuery(document).ready(function ($){
    $('.iphorm_1_1').keyup(function(){
    var s= $(this).val();
    if (s.indexOf("http://") != -1)
    alert("please without http://");
    });
    });
    </script>

    change .iphorm_1_1 to your field ID

    #11658
    spelorzi
    Participant

    Thanks josef777. I’m still learning/reading about JavaScript (Reading Eloquent Javascript right now).

    Now, with your code i get a popup to remove the link as soon as i type/copy it, but if i click okay i can keep going and try to submit.

    Is there something i can add there so when the alert happens it also REMOVES http:// for the user? , and will this work if the user types multiple links?. If its not possible to remove ONLY http:// and leaves the rest. Then some sort of script to remove all the field i guess, but will really like to only remove http:// like i said.

    Sorry if i ask for too much, i would really love to know how to do it myself, but i’m still in early learning of jscript :(.

    Thanks for your help in advance.

    S.

    • This reply was modified 9 years, 10 months ago by spelorzi.
    #11660
    josef777
    Participant

    try this http://jsfiddle.net/Xotic750/kyKsK/ or wait for ally , i am sure he has a better solution !

    #11736
    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.

    #11749
    spelorzi
    Participant

    Awesome Ally! Thanks!, also thanks Josef777!

Viewing 8 posts - 1 through 8 (of 8 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