Discussions

Submit HTML form and redirect.

  • 1.  Submit HTML form and redirect.

    Posted 01-29-2018 06:50
    I have build a form using the wizard below: 

    https://mhub.quickbase.com/db/6mztyxu8?act=DBPage&pagename=formWizard.html&baseRealm=mhub.qu...

    I added to my website, but when they submit the form, it does NOT redirect. The page completely goes blank. It does populate into my table in the app. 
     Also, I would like to have a "Thank you" message after I submit.

    Here is the code if someone can help me? What else is missing?



    <h2>SOLICITA??O DE PROPOSTA</h2><form name=qdbform method=POST onsubmit='return validateForm(this)' encType='multipart/form-data' action=https://mhub.quickbase.com/db/bm7dd2wmm?act=API_AddRecord&apptoken=cwfcy7gdzqrsyncqbi2bn4u4kr>">https://mhub.quickbase.com/db/bm7dd2wmm?act=API_AddRecord&apptoken=cwfcy7gdzqrsyncqbi2bn4u4kr>">https://mhub.quickbase.com/db/bm7dd2wmm?act=API_AddRecord&apptoken=cwfcy7gdzqrsyncqbi2bn4u4kr>;
    <input type=hidden name=fform value=1>
    <table>


    <tr><td class=m>Nome Fantasia:</td>
    <td class=m><input type=text size=40 name=_fid_60 ></td></tr>

    <tr><td class=m><font color=red size=+1>* </font>CNPJ:</td>
    <td class=m><input type=text size=40 name=_fid_56 ></td></tr>

    <tr><td class=m><font color=red size=+1>* </font>Faturamento Total:</td>
    <td class=m><input type=text size=10 name=_fid_41 ></td></tr>

    <tr><td class=m><font color=red size=+1>* </font>Valor do ticket m?dio:</td>
    <td class=m><input type=text size=10 name=_fid_43 ></td></tr>

    <tr><td class=m><font color=red size=+1>* </font>D?bito</td>
    <td class=m><input type=text size=10 name=_fid_45 ></td></tr>

    <tr><td class=m><font color=red size=+1>* </font>Cr?dito a vista</td>
    <td class=m><input type=text size=10 name=_fid_46 ></td></tr>

    <tr><td class=m>Cr?dito Parcelado 2 a 6 parcelas</td>
    <td class=m><input type=text size=10 name=_fid_47 ></td></tr>

    <tr><td class=m>Cr?dito Parcelado 7 a 12 parcelas</td>
    <td class=m><input type=text size=10 name=_fid_48 ></td></tr>

    <tr><td class=m>% de vendas em debito?</td>
    <td class=m><select  name=_fid_57 ><option>0%</option>
    <option>10%</option>
    <option>20%</option>
    <option>30%</option>
    <option>40%</option>
    <option>50%</option>
    <option>60%</option>
    <option>70%</option>
    <option>80%</option>
    <option>90%</option>
    <option>100%</option>
    </select></td></tr>
    <tr><td class=m>% de vendas em credito?</td>
    <td class=m><select  name=_fid_58 ><option>0%</option>
    <option>10%</option>
    <option>20%</option>
    <option>30%</option>
    <option>40%</option>
    <option>50%</option>
    <option>60%</option>
    <option>70%</option>
    <option>80%</option>
    <option>90%</option>
    <option>100%</option>
    </select></td></tr>
    <tr><td class=m>Realiza antecipa??o das vendas?</td>
    <td class=m><select  name=_fid_51 ><option>Nao</option>
    <option>Sim</option>
    </select></td></tr>
    <tr><td class=m>Qual a taxa atual de antecipa??o?</td>
    <td class=m><input type=text size=40 name=_fid_61 ></td></tr>

    <tr><td class=m>Com qual adquirente trabalha atualmente?</td>
    <td class=m><input type=text size=40 name=_fid_72 ></td></tr>
    <tr><td class=m>Nome</td>
    <td class=m><input type=text size=40 name=_fid_62 ></td></tr>
    <tr><td class=m>Sobrenome</td>
    <td class=m><input type=text size=40 name=_fid_63 ></td></tr>
    <tr><td class=m><font color=red size=+1>* </font>Email:</td>
    <td class=m><input type=text size=40 name=_fid_71 ></td></tr>
    <tr><td class=m><font color=red size=+1>* </font>Telefone Celular</td>
    <td class=m><input type=text size=40 name=_fid_55 ></td></tr>
    <tr><td class=m>Representante PagueCard</td>
    <td class=m><input type=text size=40 name=_fid_64 ></td></tr>
    </table><input type=hidden name=rdr value='http://www.paguecard.com'>;
    <input type=submit value=Save>
    </form>
    <br />Powered by PAGUECARD SOLUCOES DE PAGAMENTOS <a href="http://www.paguecard.com/"></a>;
    <font color=red>* CAMPOS OBRIGATORIOS</font>




    <script lang="javascript">
    function CheckForOther (item, origlen)
    {
    var sitem = item.options[item.selectedIndex];

    if (item.selectedIndex == (item.length - 1))
    {
    var val = prompt ("ADD A NEW CHOICE:", "");

    if (val == null)
    item.selectedIndex = 0;
    else
    {
    var slen = item.length;

    if (slen == origlen+1){
    item.options[slen] = new Option (sitem.text, sitem.value);
                            }

    item.options[item.length-2].text = val;
    item.options[item.length-2].value = val;
    item.selectedIndex = item.length-2;
    }
    }
    }



    </script>
    <script lang=javascript>
    function validateForm(theForm)
    {
    if(theForm._fid_56.value == "")
    {
    alert('Please enter a value for the "CNPJ:" field.');
    theForm._fid_56.focus();
    return (false);
    }
    }

    </script>