Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

ACS Cloud.Users.secureCreate() error

$
0
0

Trying to pass my form values to the secureCreate() method. View

<Alloy>
    <Window class="container" id="registerUser" >
        <Require src="header" type="view" />
        <ScrollView class="formLayout">
            <TextField id="firstName" hintText="First Name"/>
            <TextField id="lastName" hintText="Last Name"/>
            <TextField id="email" hintText="Email Address"/>
            <TextField id="phone" hintText="Enter mobile number"/>
            <TextField id="userPassword" passwordMask="true" hintText="Enter Password"/>
            <TextField id="userPasswordConfirm" passwordMask="true" hintText="Re-enter Password"/>
        </ScrollView>
        <View class="formButton">
            <Button id="newUserSubmit" title="Submit" />
            <Button id="newUserCancel" title="Cancel" />
        </View>
    </Window>
</Alloy>
button onClick function
//Create a new user
            Cloud.Users.secureCreate({
                role : 'user',
                email: $.email.value,
                first_name: $.firstName.value,
                last_name: $.lastName.value,
                password: $.userPassword.value,
                password_confirmation: $.userPasswordConfirm.value,
                custom_fields: {
                    phone: $.phone.value
                }
but the app crashes when accessing that page with an undefined is not an object message for $.email.value. Textfields have ID's. Passing their value as parameter value. What am I missing here?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>