ihslimn / jet-form-builder-update-field

14 stars 2 forks source link

Suggestion: Ability to fetch parent & child in edit post #1

Closed moxet closed 1 year ago

moxet commented 1 year ago

I've tried the add-on and it works perfect as explained in tutorial.

I have a suggestion to add support for edit CPT form, it doe'snt fetch child element which was selected in adding CPT form.

Regards

ihslimn commented 1 year ago

do you mean loading values on form load?

ihslimn commented 1 year ago

I suppose you meant exactly that :) please, check updated version and let me know it works as you need

moxet commented 1 year ago

Yes exactly! Load values in form preset. It actually fetch the parent value but not child checkboxes.

On Sun, 16 Jul 2023 at 6:00 PM Mykhailo Kulinich @.***> wrote:

I suppose you meant exactly that :) please, check updated version and let me know it works as you need

— Reply to this email directly, view it on GitHub https://github.com/ihslimn/jet-form-builder-update-field/issues/1#issuecomment-1637078717, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHAO4MKIX6GDBIDIUHJA33XQPQVZANCNFSM6AAAAAA2L4QG2Y . You are receiving this because you authored the thread.Message ID: @.***>

ihslimn commented 1 year ago

as I mentioned - you may download a new version, it works as you need I close this issue as resolved

moxet commented 1 year ago

Hi @ihslimn i used the updated code, it has same issue if you want to see. Support might have shared the logins of healthcare directory. Form name is edit_doctor

ihslimn commented 1 year ago

https://prnt.sc/lt-PEgNNkTsq you just forgot to enable the option in the field

I enabled it now, please, check here /my-account/edit-doctor/?_doctor_id=2454 for example - specialty level two will get options upon page load (have not included your site base into URL provided you do not want to share it publicly; basically try editing "Aber Jan" doctor with the form)

moxet commented 1 year ago

Thank you for checking it, i did enabled that in the start perhapse i just duplicate the add_doctor form and just added _doctor_id to fetch dynamic data. I can see Abeer jan docto has loaded the parent category but checkboxes are not visibile

Please check here https://prnt.sc/jpWR9uJLc9Wl

ihslimn commented 1 year ago

It is quite strange, as this is not what I get Please, write all the steps you take to get this result

moxet commented 1 year ago

Let me share my details, please check this loom video https://www.loom.com/share/c298e112f9bf4f339f36d92b237ac4ae

ihslimn commented 1 year ago

The bug with choosing values is indeed peculiar :) I'll check it later, thank you for reporting it!

Also, you mentioned that Speciality field is not pulling top-level terms - it is just that you had it set not to Generate Dynamically, but to Terms https://prnt.sc/-bl9JTGJO5UA Now it pulls terms correctly (but it is not presetting value as you expect it to, and I will explain why)

You need a special type of preset - preset top-level term - in this case. It is not a bug report (and also not of this addon), but rather a request for the functionality of JetFormBuilder. Currently, when presetting terms it just takes some term, that may be or may be not among top-level terms. I'll see if some workaround could be used in this case, or maybe it is something that could be changed in JetFormBuilder code.

My name is "Mykhailo" and it is pronounced a bit like Me - Hi - Law, with the stress on Hi :) Any way it is just an interesting fact you may want to know Everybody calls me Misha in real life, and I'm fine with that :)

moxet commented 1 year ago

Thank you for the detailed answer Misha.

I did change the source to terms & it fetched the parent terms but i was having concern of child terms. For now i will try to show them in static checkboxes it works as its edit page not add page so we can somehow manage it.

I will appreciate if this functionality is extended to be used in future.

We can close this issue here, if you found time or plan to implement this feature, please let me know.

Best Regards

ihslimn commented 1 year ago

@moxet girafffee has updated JetFormbuilder 3.1 with a fix please, download a new version of JetFormBuilder, the bug with checking values of updated field should be gone

moxet commented 1 year ago

Hello Misha,

I am already using 3.1.0.4 but the bug is still there. Please point out if there is any other place from where i can download the updated version.

As for values loading, i somehow manage to fetch and show it with SQL Query + AutoComplete feature as seen below, the only issue now is pre-set values.

Screenshot_15

ihslimn commented 1 year ago

https://github.com/Crocoblock/jetformbuilder/tree/3.1.0 https://prnt.sc/2-7cK0Cfdh0k here

moxet commented 1 year ago

Fatal error: Cannot redeclare jet_form_builder_init() (previously declared in /home/1001093.cloudwaysapps.com/nfscargaer/public_html/wp-content/plugins/jetformbuilder/jet-form-builder.php:22) in /home/1001093.cloudwaysapps.com/nfscargaer/public_html/wp-content/plugins/jetformbuilder-3.1.0/jet-form-builder.php on line 30

ihslimn commented 1 year ago

Open zip you downloaded and rename the folder from jetformbuilder-3.1.0 to jetformbuilder, and then install

or

delete the plugin and only then install a new version

moxet commented 1 year ago

Thank you, the checkbox issue has been fixed.

moxet commented 1 year ago

Hey @ihslimn can we get any updates on the checkbox values not set by default? I almost completed everything except this option

Screenshot_2

ihslimn commented 1 year ago

could you please explain the issue again? I do remember the issue with choosing a value, but no issue with default values

moxet commented 1 year ago

It was'nt selecting the preset values, which somehow i resolved with query builder + terms etc. Now it shows parent terms select but child are'nt. Same website if you want to login. Dashboard > Hospital > Edit > Cleveland Clinic Abu Dhabi