Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set custom url #15

Open
MohammedAbir opened this issue Nov 25, 2014 · 7 comments
Open

How to set custom url #15

MohammedAbir opened this issue Nov 25, 2014 · 7 comments

Comments

@MohammedAbir
Copy link

Bro how can i set default url in this widget .

there is ser default url (editable)

but i need custom url in this widget .

please fixed this problem please reply the solution

this is my code

$value, 'placement' => 'right', 'pluginOptions' => [ 'name' => 'title', ``` ], //'url' => Yii::$app->getUrlManager()->createUrl(['gallery/updatetitle']) ]); ?>
@ruskid
Copy link
Contributor

ruskid commented Nov 26, 2014

Update the extension, cause I think it was fixed 6 months ago.
03c682e

@MohammedAbir
Copy link
Author

Bro how can i implement this in my code please

@MohammedAbir
Copy link
Author

Bro i use this code

$value, 'placement' => 'right', 'pluginOptions' => [ 'name' => 'title', ], 'paramsOptions'=>[ 'url'=>Yii::$app->getUrlManager()->createUrl(['gallery/updatetitle']), 'pk'=> $value->ID ``` ], ]);?>

but this is not working

@ruskid
Copy link
Contributor

ruskid commented Nov 29, 2014

url parameter doesn't go in paramsOptions.

echo \mcms\xeditable\XEditableTextArea::widget([
'model' => $value,
'placement' => 'right',
'url' => ...

please look php source!

@MohammedAbir
Copy link
Author

Bro i have tried using this code

echo \mcms\xeditable\XEditableTextArea::widget([
'model' => $value,
'pluginOptions' => [
'name' => 'title',
],
'placement' => 'right',
'url' => 'updatetitle'
]);

but still display this error

Not Found (#404): Unable to resolve the request: gallery/updatetitle

but when i use 'url'=>'editable' this is working

but my problem isnt solved

i need custom url like this custom value and custom primary key

please reply solution . please please ...................

@MohammedAbir
Copy link
Author

this is my controller code

public function actionUpdateTitle()
{
$value=$_POST['value'];
$id=$_POST['pk'];
$update=Gallery::updateAll(['title' => $value], 'id ='.$id);
}

@MohammedAbir
Copy link
Author

Bro alhamdulillah my problem is fixed . It was url camel case problem .
actually it was my problem .our x-editable widget is ok .
many many thank you for this widget .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants