Bootstrap form generator issue

Hi All
Sorry, starting to feel like the needy kid on the block but after another day of failed tries i have to ask again

I am trying to create a bootstrap update from using generator

After several failed attempts (for not updating mainly) i decided to follow the dmxzone tutorial video exactly
Creating the details query was a breeze

The query clearly shows the ID field which is the primary key

Following the video i then created the update query. This also shows the ID field being added to the query and then used as the filter on {{$_POST.ID}} (screenshot below)

However when adding the update querty in Wappler the ID field is not added to the update query so in addition the $_POST.ID is not created also.

The fields shown below are a subset of all the database fields, most have been removed for simplicity but the ID field was never added. Also as you can see from the screenshot if i click the “+” to add another field tells me there are no more fields (there are about 20 in the table). To add extra fields i have to re-add them all and remove the unneeded ones again.

I know i could manually add the $_POST.ID within the action steps but and then manually edit in the ID field but I am sure this is not the correct way (certainly i cant get it to work).
I am sure i must be missing something obvious but having spent a full day on it i thought it time to ask.
I am determined to get to grips with wappler and not fall back to my old “everything in php” approach but I am getting frustrated having not really produced anything useable in a week (thankfully between urgent projects at present)

Hi @Hyperbytes and welcome to Wappler. Will start from what you mentioned last. Once you get used to wappler you will realize that is the ultimate software for delivering urgent projects, with a final result that will amaze everyone. Now regarding your question, if I am getting it right, you wanted some elements in your form to be added when you run the ‘form generator’. What I do is

  1. Add them later through code view, just like you mention
    or
  2. Before running the ‘form generator’ , I am adding any $_POST manually in the serverconnect. This way I can use any ‘manually added variable’ in the ‘form generator’.
  3. Especially for update actions, this is what I do. I first create the S_POST in ServerConnect and then use it as value in the ‘conditions’ tab.
  4. If forget to do it, then I just pick another $_POST, that is already there, so the field is created and I change the value by hand when code created.

Hope I helped a little.

Thank you very much

PS1 Btw there will be times that you will have to spend hours in order to find the best approach to develop a concrete functionality in Wappler. When you find ‘how to accompish’ it take notes of it. Then it will be a piece of cake to repeat it. Wappler is amazing in producing cutting edge UX results in 1/10 of time and with minimum debugging. Your cients will love you believe me. The fact that some things will take more to complete just proves that Wappler is not a toy. It is a serious programming software that lets you build almost anything. You have two top quality programmers in your hand, ServerConnect and AppConnect. They will take all the daughting task of handcoding everything and will deliver you top quality code. But you are the boss, you will tell them what to write so planning is really everything in Wappler. I realized this when I was doing stuff in DMX and now Wappler and when finished I could see that some things could be done even faster if I had planned them before.

PS2. Didn’t expect PS1 to be that long sorry :slight_smile:

Thanks Nicolaos.
I really can see the potential of Wappler and I suspect those who used DMX extensions regularly will find the transition reasonably easy. While I have used some DW extensions in the past I was not a big user so this is a big change of approach form me from hand coding pretty much everything (been coding nearly 40 years, old habits are hard to break)
I have tried adding in the $_POST.ID and then manually adding the ID field to the form later but the post is still not working so i am obviously doing something wrong. I can help but feel that having to add the ID hidden field is not the way wappler generally works and there must be a simpler alternative. The lack of $_POST.Id is not really a major issue (easily added) , being missing from the update query is the issue as this means it is not added to the form needing a manual hack. Anyone any idea why the ID field is effectively filtered out of the update query field list? I appreciate it is a key field so will not/can be updated but if filtered out for that reason should it not be added as a hidden field to the form automatically as it is needed for the where clause?

Yes this is something I got used to. I mean, since Wappler filters out, the ‘id’ field, just add it manualy in through ServerConnect. Then in the ‘conditions’ tab add the ‘id’ field from the database, and for value use the $_POST created manualy. This is how I do it.
Thank you

PS. Personaly I find it really exciting that such an experienced coder, like you, chooses Wappler for development. I would really love to hear your thoughts and if you find Wappler so powerful as I do.

There lies another issue, as shown in the 3rd screenshot, when trying to add another field wappler says “no items” even though there are several other fields in the table so i cant manually add it to the update query. Basically i can only add all fields or nothing, si i have tp add all {ID not included in list) then remove those not needed so there is never an opportunity to add the ID field.
Starting to thing could there be some corruption in wappler on my system?

Hello,
The fields in the form generator are being created from the POST vars in the action.
The ID field should not be added in the update list - it must only be used in the filter tab of update record step.

Not sure what you mean by:

As I explained the form generator shows the generated POST vars, so you need to re-apply update step and save the server action so that the form generator can see them.

There is a small issue with the ‘update’. The issue is that if an update action is created, and then you add more fields in your table these are not ‘seen’ by Wappler

what I do is the following.

  1. First you have to run the connection again so it retrieves all values
  2. When inside the ‘update’ action in serverconnect add all fields (select table again). Yes when in ‘update’ Wappler won’t let you add one by one. It won’t recognise them. You will have to select tha table and add all of the fields.
  3. Delete the ‘fields’ you don’t want to update.
    3a. If the ‘fields’ you want to remove from your ‘update’ action are too many, just take a note of them in a piece of paper, so you know what to delete.

@Teodor what I think @Hyperbytes says is that when you have an ‘update’ action already created, if you add more fields in the table then, inside the ‘update’ serverconnect action, query manager won’t let you add any of the newly added fields. It says ‘no items’. What I do to resolve this is what desribed above. Select table again, to add all fields, and remove these I don’t want to update.

@Teodor On the post variable, if the ID is not included in the form (manually coding i would have added it to the form as a hidden field) how does $_POST.ID get a value or it that something i don’t need to know (wappler voodoo magic - lol)
as to the other matter, i cannot add extra fields individually to the query, only all fields by re-adding the table (then deleting those not wanted)
no-items

The table has 39 fields in it

Well, you must re-applyt the database connection step whenever there are changes in the database. To Reapply means - open it and click ok.
Then you will see the new tables/fields.

But have you added the ID field in the filters list in the update record step?

In the update action they won’t be visible. You will have to select the table to add all fields and then delete those you don’t want to update.

PS. Wow guys it’s Sunday and this post is onfire haha. @Teodor get some rest :smile:

1 Like

I will check the whole procedure tomorrow in the office and will let you know if there is something wrong.

@Teodor Already done the regeneration bit (open connection, hit test, re-save?)
And Teodor, you do a great job helping fools like me, learning Wappler is my day off fun (am feeling like a real noobie, not felt like that since the 80s), You need to take a break occasionally, Monday is always soon enough.

@t11 Nickoloas if you cant select individual fields what is the point of the “+” do you think? Selecting the table adds all the fields, surely the “+” should allow individual fields to be added?

You should be able to select individual fields of course!
I will test this tomorrow and will let you know what’s wrong. We will improve this in this week’s update if it is broken in Wappler :slight_smile:

1 Like

@Hyperbytes, yes although there is the ‘+’ sign it does not help when editing an already created ‘update’ server action. So yes you will have to add all values and then delete what you don’t need.

So the ID fields can never be added to the form to set the value of $_POST.ID? Got to be more to it than that. Time to take a break, reflect and spend some family time and maybe drink a beer or two watching a certain football match later. Thanks everyone for indulging me.

1 Like

I now have the form update working as it should. I rebuild all the queries, ignored the Id field step shown in the update query video and it seems to work as it should. Clearly my suggestion that the value could be passed by Wappler voodoo magic was correct (handled by events and variables i assume rather than form values).
The “+” sign to add extra fields in the update query remains non functional however.

Hey @t11 and @Hyperbytes - thanks for reporting these issues!
I’ve just checked everything step by step and indeed there are some things which need to be improved. We are already working on the improvements and i hope to get this done for this weeks update :slight_smile:

2 Likes

@Teodor: I just had the same issue. Form will show the Original record content, but will not update for some odd reason. I will just wait for the next update. Happy to see I am not the only one having issues. :rofl: