DMXzone Database Updater PHP Support Product Page
Answered
update record table With Dynamic Select
Asked 14 Dec 2016 10:12:08
1
has this question
14 Dec 2016 10:12:08 Jean Pierre Valls posted:
Hello,I have two tables:
prestation and type_prestation, which are linked by an ID.
I managed to do the insertion form. The table type_prestation is represented by a "select".
I can not get the update form. I do not know how to manage the select in the form so that it displays the correct record of the table: type_prestation according to the record of the table prestation
www.aide-debrouille-informatique.fr/img_dmxzone/cap_frm_modif.jpg
In the old obsolete Server behavior version, it was a manupulation that I realized in 5 mn.
I still have a lot to learn with these new extensions.
Thank you for your help, if you have a video, I would be delighted.
Excuse my English, I'm a Frenchman.
Best Regards
Replies
Replied 14 Dec 2016 10:34:33
14 Dec 2016 10:34:33 Teodor Kuduschiev replied:
Hello,
All you need to do is:
1. Create the dynamic select from a query from type_prestation table
2. In the data bindings panel:
- Click the data binding which returns the type
- Click your select menu
- Select: select.data.value and then click the Bind button
All you need to do is:
1. Create the dynamic select from a query from type_prestation table
2. In the data bindings panel:
- Click the data binding which returns the type
- Click your select menu
- Select: select.data.value and then click the Bind button
Replied 14 Dec 2016 12:46:20
14 Dec 2016 12:46:20 Jean Pierre Valls replied:
Thanks, I will try to apply your method.
I will tell you if it works
I will tell you if it works
Replied 14 Dec 2016 14:16:06
14 Dec 2016 14:16:06 Jean Pierre Valls replied:
Sorry, I can not display the item of type_prestation in the "select".
I give you the code of my form.
The other fields display the correct value as soon as you change the record in the list of services.
Do you have a concrete example to show me.
Thank you for your help.
==============
My code
<form id="form" method="post" role="form">
<div class="form-group">
<label for="prestation" class="control-label">Prestation</label>
<input type="text" class="form-control" name="prestation" id="prestation" value="{{prestation}}">
</div>
<div class="form-group">
<label for="prix" class="control-label">Prix</label>
<input type="text" class="form-control" name="prix" id="prix" value="{{prix_ttc}}">
</div>
<div class="form-group">
<label for="ref_type" class="control-label">Type de prestation</label>
<select class="form-control" name="ref_type" id="ref_type" data-binding-value="" data-binding-repeat-children="{{exeListeType.data.rsTypePresta}}" data-binding-id="repeat">
<option value="{{id_type_prestation}}">{{type_prestation}}</option>
</select>
</div>
<input type="hidden" name="id_prestation" id="id_prestation" value="{{id_prestation}}">
<div class="form-group" align="right">
<button type="submit" class="btn btn-success btn-sm">Valider</button>
</div>
</form>
================
I give you the code of my form.
The other fields display the correct value as soon as you change the record in the list of services.
Do you have a concrete example to show me.
Thank you for your help.
==============
My code
<form id="form" method="post" role="form">
<div class="form-group">
<label for="prestation" class="control-label">Prestation</label>
<input type="text" class="form-control" name="prestation" id="prestation" value="{{prestation}}">
</div>
<div class="form-group">
<label for="prix" class="control-label">Prix</label>
<input type="text" class="form-control" name="prix" id="prix" value="{{prix_ttc}}">
</div>
<div class="form-group">
<label for="ref_type" class="control-label">Type de prestation</label>
<select class="form-control" name="ref_type" id="ref_type" data-binding-value="" data-binding-repeat-children="{{exeListeType.data.rsTypePresta}}" data-binding-id="repeat">
<option value="{{id_type_prestation}}">{{type_prestation}}</option>
</select>
</div>
<input type="hidden" name="id_prestation" id="id_prestation" value="{{id_prestation}}">
<div class="form-group" align="right">
<button type="submit" class="btn btn-success btn-sm">Valider</button>
</div>
</form>
================
Replied 14 Dec 2016 14:56:03
14 Dec 2016 14:56:03 Teodor Kuduschiev replied:
It appears to me you did not do this:
Replied 14 Dec 2016 15:36:57
14 Dec 2016 15:36:57 Jean Pierre Valls replied:
Ok, but what code I must have once the different done, for the select
I'try again
I'try again
Replied 14 Dec 2016 16:11:12
14 Dec 2016 16:11:12 Jean Pierre Valls replied:
Hello Teodor
I am sorry but I can not understand the procedure because nothing appears in the "select".
If you have a tutorial, this could help me, I'm on this block for a day. And I can not find a solution.
I arrived for the insertion of the data, but the update, there is something I do not understand.
I am not very good at English to understand all the advantages of these new extensions.
Thank you for your dedication to help me.
cordially
Jean Pierre
I am sorry but I can not understand the procedure because nothing appears in the "select".
If you have a tutorial, this could help me, I'm on this block for a day. And I can not find a solution.
I arrived for the insertion of the data, but the update, there is something I do not understand.
I am not very good at English to understand all the advantages of these new extensions.
Thank you for your dedication to help me.
cordially
Jean Pierre
Replied 14 Dec 2016 16:36:35
14 Dec 2016 16:36:35 Teodor Kuduschiev replied:
What do you mean by: "nothing appears in the "select" "?
Did you bind the binding to the select.data.value from the html5 data bindings panel?
Did you bind the binding to the select.data.value from the html5 data bindings panel?
Replied 14 Dec 2016 17:03:44
14 Dec 2016 17:03:44 Jean Pierre Valls replied:
What do you mean by: "nothing appears in the "select" "?
>> The list of values in the table does not appear in the menu list.
It's complicated for me to understand this procedure.
>> The list of values in the table does not appear in the menu list.
It's complicated for me to understand this procedure.
Replied 14 Dec 2016 18:10:24
14 Dec 2016 18:10:24 Teodor Kuduschiev replied:
Sorry, but i don't understand you.
Please provide a link where i can check this.
Please provide a link where i can check this.
Replied 15 Dec 2016 15:06:37
15 Dec 2016 15:06:37 Jean Pierre Valls replied:
Hello,
After a few searches, I used the extension "Bootstrap 3 Dynamic Form Generator", I watched the video:
www.dmxzone.com/go/32459/dynamic-radio-buttons-in-update-record-form
I replaced the radio button selection, with a "select".
Here is an example. : http://www.veloscopie.com/console/test/
The source code only "select"
<select class="form-control" name="ref_type_prestation" id="ref_type_prestation" data-binding-value="{{ref_type_prestation}}" data-binding-repeat-children="{{liste_prestation.data.rsType}}" data-binding-id="repeat">
<option value="{{id_type_prestation}}">{{type_prestation}}</option>
</select>
This is what we wanted for the update form.
Thank you for your help
cordially
Jean Pierre
After a few searches, I used the extension "Bootstrap 3 Dynamic Form Generator", I watched the video:
www.dmxzone.com/go/32459/dynamic-radio-buttons-in-update-record-form
I replaced the radio button selection, with a "select".
Here is an example. : http://www.veloscopie.com/console/test/
The source code only "select"
<select class="form-control" name="ref_type_prestation" id="ref_type_prestation" data-binding-value="{{ref_type_prestation}}" data-binding-repeat-children="{{liste_prestation.data.rsType}}" data-binding-id="repeat">
<option value="{{id_type_prestation}}">{{type_prestation}}</option>
</select>
This is what we wanted for the update form.
Thank you for your help
cordially
Jean Pierre
Replied 15 Dec 2016 15:10:28
15 Dec 2016 15:10:28 Teodor Kuduschiev replied:
So isn't it working as supposed now?
Replied 15 Dec 2016 15:47:03
15 Dec 2016 15:47:03 Jean Pierre Valls replied:
Everything works as I wanted.
Problem solved
Thank's
Problem solved
Thank's
Replied 26 Nov 2023 08:21:04
26 Nov 2023 08:21:04 User replied:
MUNBYN PDA products are highly compatible, have a long warranty, and offer fast technical support but they have also contributed to sustainability efforts. I suggest you check portable printer and learn more interesting things about printers. With dynamic labels, the need for excessive label printing is significantly reduced, minimizing paper waste and promoting eco-friendly practices. Munbyn's dedication to environmental responsibility aligns with the growing demand for sustainable business practices, making their products an attractive choice for companies aiming to reduce their ecological footprint while embracing innovative labeling technologies.