question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Various bugs and fix requests with w2ui.form

See original GitHub issue

1- The disable feature should be added to the action button. because I don’t want the save button to be active. I want it to be active when there is a change in w2ui.form. In this, it is necessary to add disabled to the button.

2- “render” method should be added for each field in w2ui.form. example;

{
field: 'CreatedDateTime',
type: 'datetime',
html: {
label: 'Oluşturulma Tarihi'
},
render: function (date) {
return w2utils.date(date)
}
}

3- I have a function create Form(recid, title) {} method. If I’m going to make an edit, I assign the value of selection to the value of recid. If I am going to add a new record, I give its value zero. but there is a problem. For example, there is a field called CreateDateTime. It should be displayed when edited. “CreateDateTime” should not be a field when adding a new record. ok this issue seems to be "push"able using the w2ui.form.fields array. but then “render function” probably won’t work.

4- When the text field is disabled, the cursor sign appears when the mouse is hovered, it looks like it can be edited. cursor icon should be changed to make it understandable.

Appearing image

Must be image

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
mpf82commented, Sep 13, 2021

How can I use it in the form? can you give an example?

Demo for w2ui 2.0:

http://jsfiddle.net/5z1boft7/

For w2ui 1.5 replace

addType( ‘mytype’, function(options) {

with

$().w2field(‘addType’, ‘myType’, function (options) {

1reaction
mrg2001commented, Aug 23, 2021

Thank you for you feedback. Some points are great. Here is some feedback (I will keep the issue open to make sure it is taken care of)

  1. Arguable. Clicking on save button should show error messages. It is helpful for user to see what is not filled out. There is only one valid case (in my opinion), when you open existing data and did not save it. But it is no such a problem if you resave it.
  2. Good idea
  3. CreateDateTime should not be part of form at all.
  4. Good idea
Read more comments on GitHub >

github_iconTop Results From Across the Web

w2form.request | JavaScript UI - w2ui
w2form.request. Reloads record data and refreshes the form. request([postData], [callBack]) ... You can also use .reload() method to reload the form data.
Read more >
w2grid.postData | JavaScript UI - w2ui
postData object will instruct the grid to submit these parameters to the remote data source with each remote request (pull, sort, search, save,...
Read more >
Documentation | JavaScript UI - w2ui
My form has a list field with an url, which provides the items as items:[{id:1, text:'A'}, {id:2, text:'B'}, etc.... If I want to...
Read more >
Documentation | JavaScript UI - w2ui
Regular <select> input is nice, but quite limited. ... You can provide various options for numeric fields as second argument. ... Fixed it...
Read more >
w2form.save | JavaScript UI - w2ui
callBack, function, call back function when form is reloaded (optional) ... Please note that the .url property has to be defined for save...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found