TOPIC:

Parameter/Variable via URL (date, select, checkbox) 3 weeks 18 hours ago #245464

  • FiftyNineDesign's Avatar Topic Author
  • FiftyNineDesign
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 47
  • Thanks: 0
Hello team crosstec,

i have build a form using quickmode - i`d like to send the data for the form via url,
so i checked the forum and found this:
crosstec.org/de/forums/3-breezingforms-f...us-url-auslesen.html

This is working for textfields, but not for a datepicker, or selectfield or radiofield.

Could you please advice how to send the value to a date picker input, select field and radiofield?
Check my screenshot, the value for the datepicker is there, but it is at the wrong place (in the button instead of the input value)
Attachments:

Please Log in or Create an account to join the conversation.

Last edit: Post by FiftyNineDesign.

Parameter/Variable via URL (date, select, checkbox) 3 weeks 18 hours ago #245470

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9796
  • Karma: 167
  • Thanks: 785
Hi,

what if you try it like this
<?php return htmlentities(JRequest::getVar('date')) . '::' ?>

The :: in the end is a splitter between what is supposed to be displayed on the left (the field value) of it and the right (the button value)

The right of :: is simply empty in this case so it just displays the calendar icon.

Requires the latest BF version as this has been accidentally removed in previous versions.

Regards,
Markus

Please Log in or Create an account to join the conversation.

Parameter/Variable via URL (date, select, checkbox) 3 weeks 15 hours ago #245509

  • FiftyNineDesign's Avatar Topic Author
  • FiftyNineDesign
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 47
  • Thanks: 0
Hi Markus,
that looks promising, could you please provide that script, so it would work here
"Formular > Erweitert > mehr optionen > Formularteile > Vor Formular >> Spezial"

I`ve set it up like this:
$this->execPieceByName('ff_InitLib');
//URL Parameter auslesen
$datum_ankunft = JRequest::getVar('datum_ankunft');
$datum_abreise = JRequest::getVar('datum_abreise');

//Werte einem Element zuweisen
ff_setValue('ff_nm_datum_ankunft',$datum_ankunft);
ff_setValue('datum_abreise',$datum_abreise);

I have more values, so it would be nice to have all scripts at one place,
thank you.

Please Log in or Create an account to join the conversation.

Parameter/Variable via URL (date, select, checkbox) 3 weeks 15 hours ago #245511

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9796
  • Karma: 167
  • Thanks: 785
Hi,

basically like this
ff_setValue('datum_ankunft',$datum_ankunft . '::');
ff_setValue('datum_abreise',$datum_abreise . '::');
The following user(s) said Thank You: FiftyNineDesign

Please Log in or Create an account to join the conversation.

Parameter/Variable via URL (date, select, checkbox) 2 weeks 6 days ago #245562

  • FiftyNineDesign's Avatar Topic Author
  • FiftyNineDesign
  • Offline
  • Junior Breezer
  • Junior Breezer
  • Posts: 47
  • Thanks: 0
Hi Marcus,
thank you.

This is working now.
---
For my other topics "select" and "radio", i found this very helpful:
crosstec.org/en/forums/1-forums/121545-p...fields-from-url.html

I also found some other posts here in the forum, but this was the fastest and easiest way to do the "select" and "radio". If you have some selectfields the script gets long =):
$this->execPieceByName('ff_InitLib');
//URL Parameter auslesen
$datum_ankunft = JRequest::getVar('datum_ankunft');
$datum_abreise = JRequest::getVar('datum_abreise');
$erwachsene_data = JRequest::getVar('erwachsene_data');
$kinder_6_data = JRequest::getVar('kinder_6_data');
$kinder_12_data = JRequest::getVar('kinder_12_data');
$zimmerbelegung_bali = JRequest::getVar('zimmerbelegung_bali');
$extra_1_price = JRequest::getVar('extra_1_price');
$extra_2_price = JRequest::getVar('extra_2_price');
$zimmer_bali = JRequest::getVar('zimmer_bali');
$zimmer_finnland = JRequest::getVar('zimmer_finnland');
$zimmer_holland = JRequest::getVar('zimmer_holland');
$zimmer_nemo = JRequest::getVar('zimmer_nemo');
$zimmer_dschungel = JRequest::getVar('zimmer_dschungel');
$zimmer_hobbit = JRequest::getVar('zimmer_hobbit');


//Werte einem Element zuweisen
ff_setValue('datum_ankunft',$datum_ankunft . '::');
ff_setValue('datum_abreise',$datum_abreise . '::');
ff_setValue('anzahl_erwachsene',$erwachsene_data);
ff_setValue('anzahl_kinder_0_6',$kinder_6_data);
ff_setValue('anzahl_kinder_7_12',$kinder_12_data);


// Werte für Radio Buttons (Extras)
if ($extra_1_price!=="0")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
document.getElementById("ff_elem105").checked = true;
 });                              
</script>';
if ($extra_1_price=="0")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
document.getElementById("ff_elem105_1").checked = true;
 });                              
</script>';
if ($extra_2_price!=="0")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
document.getElementById("ff_elem106").checked = true;
 });                              
</script>';
if ($extra_2_price=="0")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
document.getElementById("ff_elem106_1").checked = true;
 });                              
</script>';


// Werte für Select Felder (Zimmer)
if ($zimmer_bali=="Keine")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem79 option[value="Keine"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_bali=="1 Person")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem79 option[value="1 Person"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_bali=="2 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem79 option[value="2 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';

if ($zimmer_finnland=="Keine")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem84 option[value="Keine"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_finnland=="1 Person")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem84 option[value="1 Person"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_finnland=="2 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem84 option[value="2 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';

if ($zimmer_holland=="Keine")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem85 option[value="Keine"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_holland=="1 Person")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem85 option[value="1 Person"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_holland=="2 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem85 option[value="2 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_holland=="3 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem85 option[value="3 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_holland=="4 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem85 option[value="4 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_holland=="5 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem85 option[value="5 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';

if ($zimmer_nemo=="Keine")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem86 option[value="Keine"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_nemo=="1 Person")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem86 option[value="1 Person"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_nemo=="2 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem86 option[value="2 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_nemo=="3 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem86 option[value="3 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_nemo=="4 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem86 option[value="4 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';

if ($zimmer_dschungel=="Keine")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem87 option[value="Keine"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_dschungel=="1 Person")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem87 option[value="1 Person"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_dschungel=="2 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem87 option[value="2 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_dschungel=="3 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem87 option[value="3 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_dschungel=="4 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem87 option[value="4 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_dschungel=="5 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem87 option[value="5 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';

if ($zimmer_hobbit=="Keine")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem88 option[value="Keine"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_hobbit=="1 Person")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem88 option[value="1 Person"]\').attr(\'selected\', \'selected\');
 });                              
</script>';
if ($zimmer_hobbit=="2 Personen")
echo '<script type="text/javascript"> 
jQuery(document).ready(function(){
jQuery(\'#ff_elem88 option[value="2 Personen"]\').attr(\'selected\', \'selected\');
 });                              
</script>';

But it`s working nicely now.
It would be nice to have a FAQ for certain topics with BF like this,
instead of searching and asking again & again in the forum.
Many links in the forum are not working any more, please have a look.

All the best, thank you for your great work.

Greetings
Attachments:

Please Log in or Create an account to join the conversation.

Parameter/Variable via URL (date, select, checkbox) 2 weeks 6 days ago #245563

  • TheMuffinMan's Avatar
  • TheMuffinMan
  • Offline
  • Developer
  • Developer
  • Posts: 9796
  • Karma: 167
  • Thanks: 785
Hi,

I am planning to add a form repository, where people can download and install forms that work with such examples.

Regards,
Markus

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
  • 2
Moderators: ForumSupport
Time to create page: 0.056 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

Summer Sale!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!