surveyjs / survey-library

Free JavaScript form builder library with integration for React, Angular, Vue, jQuery, and Knockout.
https://surveyjs.io/form-library
MIT License
4.11k stars 801 forks source link

React-Native support & using surveyjs without front end libraries. #484

Closed safaiyeh closed 4 years ago

safaiyeh commented 7 years ago

Are there plans to support React Native? I have a need for mobile surveys; however, surveyjs service seems to have a dependency on the front end.

Is there a way to request the survey json via https without the frontend library?

andrewtelnov commented 7 years ago

@JSafaiyeh We have discussed react Native support and everybody agree that we have to implement it. Unfortunately, there are some other tasks that we believe are more urgent at the current moment. For example, move all information/libraries/services into one web site: surveyjs.io, so you would be able to find this link without any help: http://api.dxsurvey.com/Help/Api/GET-api-Survey-getSurvey_surveyId :) We did a good job to hide it from you and others :)

PS: Somebody have said me he started a public project on GitHub: surveyjs for react native. However, I could not find it now.

Thank you, Andrew

safaiyeh commented 7 years ago

Thanks for the response. I will be investigating creating react-native support.

abolger commented 7 years ago

@JSafaiyeh, I am also dying for React Native support, however in the mean time I have implemented react support in a React Native Webview component and got it working. It took a bit of finagling, but it is possible. Is there enough interest that I should create a skeleton react native project showing how I did this?

ppatel890 commented 7 years ago

I am also trying to get react native support. Webview works, but not all that well, especially with file upload/file picker. @andrewtelnov, were you able to find anything out about the public project someone started? Thank you!

ppatel890 commented 7 years ago

@andrewtelnov Do you have any pointers on where to get started if trying to create a react native implementation of surveyjs library? Would rewriting each question component within the reactjs implementation as React Native components and using the core surveyjs logic for survey flow be enough? Or would there have to be more changes to the core surveyjs logic?

andrewtelnov commented 7 years ago

@ppatel890 Unfortunately I did not write a single line of code myself on react-native platform :-(

Thank you, Andrew

bhavinpankanis commented 6 years ago

@ppatel890 @abolger Could you please provide pointers to render Survey.js in webview. I am too looking for a react-native support but I guess for the time being, I will have to go with webview solution in order to meet my requirement.

If you guys could share some sample projects then that would be really helpful. Thanks in advance

abolger commented 6 years ago

Here's a sample app so no one else had to set up the nonsense I did to make this work. https://github.com/abolger/surveyjs-inside-react-native-webview

bhavinpankanis commented 6 years ago

@abolger The project works perfectly fine.

Few queries as of now

  1. When I click on submit, the screen gets blank - Can I override this behaviour?
  2. I would like to show native controls like date-time pickers, etc. Can that be achieved using the existing bridging?. If yes, could you please provide pointers for that?
  3. Can we make the layout more responsive?

@andrewtelnov Please chime in

Thanks in advance

abolger commented 6 years ago

1) It's an open source project on the MIT license, you can change the handler do whatever you want on submit- reload the screen, navigate to your company website, literally anything.

2) The bridge implementation I used and the project provided can send messages back and forth, so I see no technical reason why you couldn't code up a 'datepicker' message and send the data back and forth to a webview over the bridge. However, the whole point (for me anyways) was to use SurveyJS as they've coded it- once you start building all the react native stuff you're talking about a considerable extension to the initial 'port'. But if you do that, I'd love to see it.

On Thu, Jan 18, 2018 at 7:26 AM, bhavinpankanis notifications@github.com wrote:

@abolger https://github.com/abolger The project works perfectly well. Just 2 queries as of now

  1. When I click on submit, the screen gets blank - Can I override this behaviour?
  2. I would like to show native controls like date-time pickers, etc. Can that be achieved using the existing bridging?. If yes, Could you please provide pointers for that?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/surveyjs/surveyjs/issues/484#issuecomment-358631818, or mute the thread https://github.com/notifications/unsubscribe-auth/AC-t3sBms-B44T7E_zoRquAGfAYTyR1Nks5tLziKgaJpZM4OOxkl .

naoey commented 5 years ago

@andrewtelnov considering there was initial interest from the SurveyJS team implementing a react native version, has there been any updates on the idea since this issue was last discussed?

andrewtelnov commented 5 years ago

@naoey We are working on this issue. After that we may try react native. We are defaintely interested in it.

Thank you, Andrew

kostiantyn-solianyk commented 5 years ago

What is the status of this issue? It would be awesome if the surveyjs worked with react-native! Did you start, maybe we can help with something?

smol-honk commented 5 years ago

I'd be willing to offer help too if we can make this possible.

andrewtelnov commented 5 years ago

@kostiantyn-solianyk @amphithere We are going to start working on it in several weeks, likely on December. At least give a try. Right now, we are working on making all UI dependent properties reactive. It makes the code for react version clean and should help with react native implementation.

Thank you, Andrew

socialsuiteDan commented 5 years ago

Is there any update on the React Native plans? We would also be willing to help, as we need to implement survey functionality across both web and react native.

andrewtelnov commented 5 years ago

@socialsuiteDan Unfortunately, there is no update since then. There are always something more urgernt. The good news, we have got two new devs in our team in March. Likely we will get one more dev in April/May. It means that we double our team. New guys need couple months to cach-up and hopefully, at last, React-Native card will move from TODO list into "In Progress" :).

To all others, who read this issue. If you are interesting in React-Native, please drop a line, to let us know that more people need it.

Thank you, Andrew

pephumin commented 5 years ago

I am interested too, and hence it is why I subscribed to this discussion for a while. It would be great to have a react native version of surveyjs.

pornprasit commented 5 years ago

i need it, thanks.

kostiantyn-solianyk commented 5 years ago

@andrewtelnov, thanks for being interested. Personally I need surveyjs in react-native too. It would be great to have this support.

frogburger commented 5 years ago

@andrewtelnov, it will be very useful for our project

mharis161 commented 5 years ago

Is there any update on the React Native plans? We would also be willing to help, as we need to implement survey functionality in react native.

mharis161 commented 5 years ago

Here's a sample app so no one else had to set up the nonsense I did to make this work. https://github.com/abolger/surveyjs-inside-react-native-webview

@abolger i have used this code

i have faced some issue Reacord audio widget not working file picker also not working

how to record voice with surveyjs in react-native

mharis161 commented 5 years ago

@andrewtelnov i am also interested in react-native survey js app.

Aequitas737 commented 5 years ago

@andrewtelnov We would also love RN support. Also willing to help out to accomplish it.

ginoburrr commented 5 years ago

@andrewtelnov We would also like React Native support.

alecdiaz1 commented 4 years ago

@andrewtelnov RN support would be great!

safaiyeh commented 4 years ago

Man, it has been a while since I been here.

For anyone that wants a way to move forward. I made my own implementation by parsing the raw data and creating our own views for it. It was not too difficult and helps to maintain your app's current design.

andrewtelnov commented 4 years ago

Hi all, Sorry for not reporting our progress here. The reason is simple. Nobody wants to bring the bad news.

We have created a prototype, survey with the text question type and limited functionality, and found out that there is no way we will be able to create a quality React Native library on JavaScript, that works great on Android and iOS. I know, it may sound disappointed, but the truth, that we must go native to get a quality library. Based on what we have learned, the right way of doing it – write the core code on C++, then reuse it for Android and iOS by creating native libraries for them and finally write wrappers around them for React Native, Xamarin and so on. Unfortunately, that is the only way to have the quality libraries and unfortunately it is resource consuming task. It doesn’t mean that we will not work on it. The fact is, that it is a big commitment for us, and we will have to hire at least two experience developers for this task.

quicksilverr commented 6 months ago

Hey @andrewtelnov Love the project and work you guys are doing. Is there any news on the native libs and wrappers?

slycadelic commented 4 months ago

Hi all, Sorry for not reporting our progress here. The reason is simple. Nobody wants to bring the bad news.

We have created a prototype, survey with the text question type and limited functionality, and found out that there is no way we will be able to create a quality React Native library on JavaScript, that works great on Android and iOS. I know, it may sound disappointed, but the truth, that we must go native to get a quality library. Based on what we have learned, the right way of doing it – write the core code on C++, then reuse it for Android and iOS by creating native libraries for them and finally write wrappers around them for React Native, Xamarin and so on. Unfortunately, that is the only way to have the quality libraries and unfortunately it is resource consuming task. It doesn’t mean that we will not work on it. The fact is, that it is a big commitment for us, and we will have to hire at least two experience developers for this task.

I am working on a project where a team has built a web platform for some company and they are using this library to handle forms (creating, filling and storing responses). Now they have asked me to create a mobile app for the same company where users can go and fill forms. Creating forms can only be done by admin from the web-platform. That saves me a lot of work.

Hence, I was looking to see if there is support for react-native or flutter. Coudn't find any but if there is any update I would love to know. In the mean time, I am consuming their api and making some react-native components that can display the questions and store answers. Starting with the simple stuff. Will update on how it goes.

andrewtelnov commented 4 months ago

@slycadelic We have not started to work on this and very unlikely we will start working on it this year. We will need to enlarge our team to go native and we are still not sure about the market here. How many developers need it and how much they are ready to pay for it.

Thank you, Andrew

synth commented 3 months ago

We would love to see React Native support! And we would pay for a separate license for it :) That said, I appreciate the effort needed to get this going. Has anyone seen this? https://github.com/shiftsmartinc/surveyjs-react-native

brianwachira commented 2 months ago

I am also trying to get react native support. Webview works, but not all that well, especially with file upload/file picker. @andrewtelnov, were you able to find anything out about the public project someone started? Thank you!

How do I run it on a webview?

brianwachira commented 2 months ago

Hi all, Sorry for not reporting our progress here. The reason is simple. Nobody wants to bring the bad news. We have created a prototype, survey with the text question type and limited functionality, and found out that there is no way we will be able to create a quality React Native library on JavaScript, that works great on Android and iOS. I know, it may sound disappointed, but the truth, that we must go native to get a quality library. Based on what we have learned, the right way of doing it – write the core code on C++, then reuse it for Android and iOS by creating native libraries for them and finally write wrappers around them for React Native, Xamarin and so on. Unfortunately, that is the only way to have the quality libraries and unfortunately it is resource consuming task. It doesn’t mean that we will not work on it. The fact is, that it is a big commitment for us, and we will have to hire at least two experience developers for this task.

I am working on a project where a team has built a web platform for some company and they are using this library to handle forms (creating, filling and storing responses). Now they have asked me to create a mobile app for the same company where users can go and fill forms. Creating forms can only be done by admin from the web-platform. That saves me a lot of work.

Hence, I was looking to see if there is support for react-native or flutter. Coudn't find any but if there is any update I would love to know. In the mean time, I am consuming their api and making some react-native components that can display the questions and store answers. Starting with the simple stuff. Will update on how it goes.

Same thing here. Is it possible to run surveyjs on a webview? I am thinking of doing that instead of building components from scratch

brianwachira commented 2 months ago

I am also trying to get react native support. Webview works, but not all that well, especially with file upload/file picker. @andrewtelnov, were you able to find anything out about the public project someone started? Thank you!

Hi, I also made it run on webview. Did you manage to fix the file picker issue? can't get the files on react native

prasunsrivastava commented 1 month ago

Man, it has been a while since I been here.

For anyone that wants a way to move forward. I made my own implementation by parsing the raw data and creating our own views for it. It was not too difficult and helps to maintain your app's current design.

Do you have a reference implementation for this? It would be really helpful to see how it was done and use that as an inspiration.