Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • My guess is that OP wants some generic getter/setter for all properties at once. Commented Apr 18, 2018 at 8:50
  • but like this i would need to set up a setter/getter for every property? edit: @dfsq yap Commented Apr 18, 2018 at 8:50
  • @therabbityouknow how many properties do you have?? How much extra work is it to wrap each? Commented Apr 18, 2018 at 8:57
  • i mean if i had to possibility to define the setters and getters in my constructor for all my fields that the form contains , guess it would be fine. I could call new Form(fields). The only thing is it should by dynamic. Commented Apr 18, 2018 at 9:00
  • defineProperty only works with objects right? Hmm ill give this a try. Thank you. Commented Apr 18, 2018 at 9:19