× Please submit new Bug Reports on GitHub: github.com/Jensen-Technologies/component-creator-issues/issues

Adding polygon and json fields to save

2 года 5 мес. назад #9928 от Phil
Phil создал тему: Adding polygon and json fields to save
I have several components working but we're finding one component needs to be updated. This requires adding two fields, type of 'polygon' and a type JSON

The way it would work is:
  1. The view outputs the form and a google map (working)
  2. The user fills in the form and draws a polygon on that map (working)
  3. The polygon points (latitudes and longitudes) are stored in a hidden form as a JSON string (easy enough)
  4. The user clicks save
  5. The form is validated
  6. The save occurs

I need to catch/modify the save (#6) so I can unpack the JSON string, put the points together into something like this:
`
``ST_GEOMFROMTEXT( 'POLYGON( (48.89 2.27, 48.89 2.42, 48.81 2.42, 48.81 2.27, 48.89 2.27) )' ) `

When the model returns the data, it only needs to return the JSON into a hidden form var. If it exists, I'll unpack that and redraw the polygon on the map. I think I have this figured out but not 100% certain.

I've figured out how to upgrade the table. That's not a problem.

So my questions are:
  1. How/where do I modify the component to add the json field so that it saves?
  2. How/where do I intercept the save process so that I can extract the JSON points and create the POLYGON entry?

Thanks!

Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.

2 года 4 мес. назад - 2 года 4 мес. назад #9946 от Louis C. Boggs
Louis C. Boggs ответил в теме Adding polygon and json fields to save
Thank yo for sharing the Info, I will try to figure it out more!
OneVanillaOneVanilla
Последнее редактирование: 2 года 4 мес. назад пользователем Louis C. Boggs.

Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.

2 года 4 мес. назад #9947 от Louis C. Boggs
Louis C. Boggs ответил в теме Adding polygon and json fields to save

Thank yo for sharing the Info, I will try to figure it out more!
OneVanilla

Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.

2 года 4 мес. назад - 2 года 3 мес. назад #9948 от Elda
Elda ответил в теме Adding polygon and json fields to save
Thank you for sharing.

my account access
Последнее редактирование: 2 года 3 мес. назад пользователем Elda .

Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.

1 год 10 мес. назад #9976 от blacksmith
blacksmith ответил в теме Adding polygon and json fields to save
<a href="livetheorangelife.info/">Live The Orange Life
<a href="walmartone.tech/">Walmart One Login – Guide For Active & Displaced Walmart Associates
<a href="www.myaccountaccess.me/">myaccountaccess/activate
<a href="www.onevanilla.onl/">One Vanilla
<a href="jcpassociatekiosk.info/jcpenney-associates-kiosk/">JCP Associate Kiosk

Пожалуйста Войти или Регистрация, чтобы присоединиться к беседе.

Время создания страницы: 0.141 секунд
Работает на Kunena форум

We use cookies so that you can place orders and we can provide a better service. You can control the use of cookies at the individual browser level. If you reject cookies, you may still use our website, but your ability to use some features or areas of our website may be limited.